START ASTROLOGER PROGRAM IN PYTHON I--DAY 7

 """

*
**
***
****
"""
# Exercise 4
# Pattern Printing
# Input = Integer n
# Boolean = True or False
#
# True n=5
# *
# **
# ***
# ****
#
# False n=5
# ****
# ***
# **
# *
"""
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()

"""
"""

n = int(input("type number of rows : "))
b = bool(int(input("type bool value 0 or 1")))
if b:
for i in range(1,n+1):
print(i*'*')
else:
for i in range(n,0,-1):
print(i*'*')
"""
a=int(input("please add no of line you want to print"))
b=bool(int(input("please add 0 for false")))
def star(a,b):
if b==True:
c=1
while c<=a:
print(c*"*")
c=c+1
else:
while a>0:
print(a*"*")
a=a-1
star(a,b)



Comments

Popular posts from this blog

java chapter11 practice question on abstruct class and interfaces

DAY 12 -AZURE DP900(Microsoft Azure Data Fundamentals: Explore non-relational data in Azure)

java exercise4