-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathjasq.py
More file actions
39 lines (36 loc) · 1.06 KB
/
jasq.py
File metadata and controls
39 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
a=input("")
length=len(a)//2
middle=8
position=9
i=0
j=1
while i<length+2:
if i==0 or i==length+1:
print("#"*19)
else:
while j<len(a)+1:
t=int(a[j])
if a[j-1]=="u":
for k in range(19):
if k==0:
print("#",end='')
elif k==(position+t):
print("*",end='')
elif k==18:
print("#")
else:
print(" ",end='')
position=position+t
elif a[j-1]=="d":
for k in range(19):
if k==0:
print("#",end='')
elif k==position-t:
print("*",end='')
elif k==18:
print("#")
else:
print(" ",end='')
position=position-t
j=j+2
i=i+1