We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d6d821 commit c28742fCopy full SHA for c28742f
Mario-Less-More/Mario-less.py
@@ -1,23 +1,14 @@
1
-# github : alisharify
2
-#implementation of Mario-Less problem set in python
3
-
4
user = 0
5
while(True):
6
- # in here we get input from user
7
try:
8
user = int(input("Enter height: "))
9
except ValueError:
10
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
+
14
if (user > 0 and user < 9):
15
break
16
17
-# if we dont + 1 to user and go from 1 to user it actually go to user - 1
18
19
for row in range(1, (user + 1)):
20
- # in first iterate we should print 4 space so we -1 to user
21
user -= 1
22
print(" " * user, end="")
23
print("#" * row)
0 commit comments