Code for this question: rows = int(input("Enter number of rows: ")) for i in range(1, rows+1): for space in range(1, (rows-i)+1): print(" ", end = "") for star in range(1, i + 1): print("* ", end = "") print()
Excellence teaching style with excellence representation love you sir and neso academy for providing such great lectures in free of cost no one in RUclips showed such great representation except neso academy ❤❤❤❤❤❤
rows = int(input("enter num of rows :")) for i in range(1,rows+1): for space in range(1,rows-i+1): print(" ",end=" ") for j in range(1,i+1): print("*",end=" ") print() for k in range(1,rows): for l in range(1,k+1): print(" ",end=" ") for m in range(rows-k,0,-1): print("*",end=" ") print()
Good day, Thank you so much for the teaching. However on this question, the given code will result in a right angled triangle with the right angle at the bottom right side. It is not giving those white spaces between the stars. Kindly check on that please. Thank you once again
Code for this question:
rows = int(input("Enter number of rows: "))
for i in range(1, rows+1):
for space in range(1, (rows-i)+1):
print(" ", end = "")
for star in range(1, i + 1):
print("* ", end = "")
print()
Excellence teaching style with excellence representation love you sir and neso academy for providing such great lectures in free of cost no one in RUclips showed such great representation except neso academy ❤❤❤❤❤❤
rows = int(input("enter num of rows :"))
for i in range(1,rows+1):
for space in range(1,rows-i+1):
print(" ",end=" ")
for j in range(1,i+1):
print("*",end=" ")
print()
for k in range(1,rows):
for l in range(1,k+1):
print(" ",end=" ")
for m in range(rows-k,0,-1):
print("*",end=" ")
print()
Thanks you dear jaspreet sing sir from Pakistan ❤❤🇵🇰🇵🇰long live for jaspreet sing sir from
Keep the good work going sir ❤
Good day, Thank you so much for the teaching. However on this question, the given code will result in a right angled triangle with the right angle at the bottom right side. It is not giving those white spaces between the stars. Kindly check on that please. Thank you once again
Please keep it going....
def star_pyramid(base=5, reverse=False):
"""
"""
for row in range(1, base+1, 1) if not reverse else range(base, 0, -1):
print(f"{' ' * (base - row)}{'* ' * (row - 1) + '*'}")
def star_pyramid(base=5, reverse=False):
rows = [f"{' ' * (base - row)}{'* ' * (row - 1) + '*'}
"
for row in (range(1, base+1, 1) if not reverse else range(base, 0, -1))]
print(rows)
Thank's sir
super
Much useful one
sir i tried this but for me it's not including space, it runs without leaving space . i had checked the code for multiple times.
me too
i just got it. Put a space between the quotation marks in the "end". Example print (end= ' ')
Sir can you upload html and css Playlist please 🙏
They written code was not running