Python Challenge: Create a Full Pyramid in 30 seconds #shorts

preview_player
Показать описание
Python Challenge: Create a Full Pyramid in 30 seconds #shorts

Get ready to put your Python skills to the test with this exciting challenge! In just 30 seconds, you can learn how to create a full pyramid pattern with Python. Watch as the asterisks stack up to create a towering structure that will amaze you.

But this is just the beginning! With Programiz PRO, you can take your programming skills to the next level with more challenges and informative content. Enroll now and step up your game.

Don't forget to follow us on social media and check our websites/apps for more great content.

#Shorts #programiz #challenge #python #pythonchallenge #pythonforbeginners #learnpython #pythonquestion
Рекомендации по теме
Комментарии
Автор

simpler way:
row = int(input("Enter the number of rows: "))
space = row - 1
for i in range(1, row*2, 2):
print(" "*space + "*"*i)
space -= 1

hussein-alemam
Автор

rows = 20
Chr = '*'
for i in range(1, rows):
print(' ' * ((rows-i)+1), end="") # Print spaces
print((Chr+' ') * i )

hydtimepass