Skip to content

Commit 7b75ef1

Browse files
authored
Update main.py
Add modulo (whatever that is)
1 parent 36c9929 commit 7b75ef1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

main.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,15 @@ def read(code):
344344
if not trying:
345345
print("ListError in line:",str(line))
346346
quit(2)
347+
elif s(line)[0] == "mod":
348+
try:
349+
op1 = var.get(s(line)[1], s(line)[1])
350+
op2 = var.get(s(line)[2], s(line)[2])
351+
var[s(line)[3]] = str(float(op1) % float(op2))
352+
except:
353+
if not trying:
354+
print("KindaBasicMathICanterror in line", str(line))
355+
quit(2)
347356
else:
348357
print("Err in line",str(i)+": Unsupported","'"+str(line)+"'")
349358
quit(1)

0 commit comments

Comments
 (0)