Skip to content

PythonSL/pythonplusplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Python++

Source Code For Python++

logo

Python++ is a lightweight; easy to learn coding language supported by Python. I will try to update the code everyday and bring new commands; bug fixes and more! Make sure to create an issue if you encounter a problem.

One plus stands for Simplicity and the other stands for Lightweight

Here are all the command's and their explanation:

✅ Core

print "text" → prints text to the console.

input "message" → asks user for input.

exit → quits Py++ interpreter.

✅ Math

add X Y → adds two numbers.

sub X Y → subtracts Y from X.

mul X Y → multiplies numbers.

div X Y → divides X by Y.

pow X Y → raises X to the power of Y.

sqrt X → square root of X.

mod X Y → remainder after division.

rand X Y → random number between X and Y.

✅ Variables

set NAME VALUE → create variable.

get NAME → prints variable value.

del NAME → deletes variable.

listvars → shows all variables.

✅ Files

write FILE "text" → writes text to file.

read FILE → prints contents of file.

append FILE "text" → adds text to end of file.

delete FILE → deletes a file.

exists FILE → checks if file exists.

✅ System

clear → clears the console.

time → shows current system time.

date → shows today’s date.

whoami → shows current username.

cwd → shows current working directory.

ls → lists files in current directory.

cd PATH → changes directory.

mkdir NAME → creates a folder.

rmdir NAME → deletes a folder.

open FILE → opens a file with default program.

run CMD → runs a Windows command.

✅ Logic & Flow

if X == Y then CMD → runs CMD if condition is true.

if X != Y then CMD → runs CMD if not equal.

repeat N CMD → runs CMD N times.

loop CMD → infinite loop until user breaks.

pause → waits for Enter key.

✅ Extra Utilities

calc "expression" → evaluates math expression.

reverse "text" → reverses a string.

upper "text" → makes text uppercase.

lower "text" → makes text lowercase.

len "text" → shows length of text.

concat "a" "b" → joins two strings.

replace "txt" "old" "new" → replace substring.

split "txt" "sep" → splits by separator.

join "sep" item1 item2 ... → joins items.

✅ Fun / Misc

beep → makes a system beep.

sleep N → waits N seconds.

dice → rolls a dice (1–6).

coin → flips a coin.

guess N → mini game, guess a number.

ascii "text" → prints ASCII codes.

char CODE → converts ASCII code to character.

repeattext "text" N → repeats text N times.

palindrome "text" → checks if text is palindrome.

factorial N → factorial of N.

fibonacci N → Nth Fibonacci number.

prime N → checks if number is prime.

About

Source Code For Python++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published