Skip to content

Commit d423265

Browse files
authored
Create print_star_using_loops.py
1 parent bc006ea commit d423265

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

print_star_using_loops.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
print("How Many Row You Want To Print")
2+
one= int(input())
3+
print("Type 1 Or 0")
4+
two = int(input())
5+
new =bool(two)
6+
if new == True:
7+
for i in range(1,one+1):
8+
for j in range(1,i+1):
9+
print("*",end=" ")
10+
print()
11+
elif new ==False:
12+
for i in range(one,0,-1):
13+
for j in range(1,i+1):
14+
print("*", end="")
15+
print()

0 commit comments

Comments
 (0)