Print Pyramid in Python

Опубликовано: 26 Март 2025
на канале: Asmr Coding #Shorts
23
like

Relax and enjoy the soothing sounds of coding as we build a Python-powered pyramid from scratch. This ASMR-style video features gentle keystrokes, soft clicks, and the rhythmic flow of Python programming—no talking, just pure coding relaxation. Watch as the pyramid takes shape, line by line, in a calm and meditative coding session. Perfect for unwinding or finding inspiration for your next project. Sit back, listen, and immerse yourself in the art of quiet coding. 🖥️🐍✨

https://kodluyo.com/#editor

Source Code:

def line(firstSpace,starCount,lastSpace):
for i in range(firstSpace):
print(" ",end="")
for i in range(starCount):
print("*",end="")
for i in range(lastSpace):
print(" ",end="")
print("",end="\n")

def pyramid( width ):
is_even = width % 2 == 0
if(is_even):
pyramid_even(width)
else:
pyramid_odd(width)

def pyramid_even(width):
size = (int)(width/2)
for y in range(size):
line(size-(y+1),2*(y+1),size-(y+1))

def pyramid_odd(width):
size = (int)(width/2)
for y in range(size+1):
line(size-(y+1)+1,1 + 2*(y),size-(y+1))


pyramid(36)
print("Success, Thanks for wathching =)")


На этой странице сайта вы можете посмотреть видео онлайн Print Pyramid in Python длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Asmr Coding #Shorts 26 Март 2025, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 23 раз и оно понравилось like зрителям. Приятного просмотра!