StateZ is simple programming language that is writted in Python 3.10. It does not have complex functionalities and is just made for fun. Stars are very much appreciated. Everyone can also contribute to the repository, just make a pull request.
print('Hello, World!')
Run from interpreter directly
python interpreter.py *your_filename.stz
Run from StateZ shell
python runtime_shell.py
$state> run("*your_filename.stz")
var cash = 100
var name = "Jake"
var new_cash = 100 + 10
var total_cash = cash + new_cash
print(cash)
print(name)
print(total_cash)
Output:
100
Jake
210
var cash = 100
if cash == 100 then var output= "cash is 100" elif cash == 101 var output = "cash is "101" else var output("cash is something else")
print(output)
var cash = 100
if cash == 100 then var output= "cash is 100" elif cash == 101 var output = "cash is "101" else var output("cash is something else")
print(output)
Output:
cash is 100
for i = 0 to 3 then
print("hello")
end
Output:
hello
hello
hello
function call_great(prefix) -> prefix + " is great"
print(call_great("Aditya"))
Output
Aditya is great