Skip to content

Commit c28742f

Browse files
authored
Update Mario-less.py
1 parent 5d6d821 commit c28742f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Mario-Less-More/Mario-less.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
# github : alisharify
2-
#implementation of Mario-Less problem set in python
3-
41
user = 0
52
while(True):
6-
# in here we get input from user
73
try:
84
user = int(input("Enter height: "))
95
except ValueError:
106
continue
11-
12-
# in here we check if user input is not between 1 to 8
13-
# with this while loop we ask again to user coprate with us
7+
148
if (user > 0 and user < 9):
159
break
1610

17-
# if we dont + 1 to user and go from 1 to user it actually go to user - 1
18-
1911
for row in range(1, (user + 1)):
20-
# in first iterate we should print 4 space so we -1 to user
2112
user -= 1
2213
print(" " * user, end="")
2314
print("#" * row)

0 commit comments

Comments
 (0)