-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz4.py
More file actions
40 lines (38 loc) · 815 Bytes
/
quiz4.py
File metadata and controls
40 lines (38 loc) · 815 Bytes
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
40
# # printing patterns
# f=open("ansh.txt")
# j=open("ansh2.txt")
# con=j.read()
# content=f.read()
# inint=int(input("Enter any number\n"))
# inbo=int(input("Enter 0 or 1\n"))
#
# while (True):
#
# if inint & inbo == True:
# print(content)
# break
#
#
# elif inint & inbo == False:
# print(con)
# break
#
# else:
# print("Invalid input\n")
# exit()
#
print("How Many Row You Want To Print")
one= int(input())
print("Type 1 Or 0")
two = int(input())
new =bool(two)
if new == True:
for i in range(1,one+1):
for j in range(1,i+1):
print("*",end=" ")
print()
elif new ==False:
for i in range(one,0,-1):
for j in range(1,i+1):
print("*", end="")
print()