Skip to content

Commit 1744add

Browse files
authored
Create jive.py
1 parent 1205ad6 commit 1744add

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

jive/jive.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
p=0;tv=0;tv2=0;s=[];num=list(map(str,range(10)))
2+
c=""""""
3+
while len(c)>p:
4+
if c[p]=="*":s.append(input())
5+
elif c[p]=="`":
6+
if c[p+1]==",":s[-1]=int(s[-1])
7+
elif c[p+1]==".":s[-1]=float(s[-1])
8+
elif c[p+1]=="\"":s[-1]=str(s[-1])
9+
elif c[p]=="!":
10+
tv2=tv=s[-1]
11+
while tv2>1:tv2-=1;tv*=tv2
12+
s.append(tv)
13+
elif c[p]=="↑":print(s)
14+
elif c[p]=="↓":print(s.pop())
15+
elif c[p]=="[":
16+
while c[p]!="]":p+=1
17+
elif c[p]in num:s.append(int(c[p]))
18+
p+=1

0 commit comments

Comments
 (0)