Print stars '*' in Pyramid | Lesson 6 - Zero to Software Engineer

preview_player
Показать описание
This Bootcamp will follow the roadmap covered in this video

In this video we will run through a fun exercise with while loops!

Here is the question prompt:

'''
Given an input of size: n, where n greater than 0, output a
pyramid where the base is the size of n.

EX:
n = 1
*

n = 3

*
***

n = 5

*
***
*****

'''

This Bootcamp will follow the roadmap covered in this video

🔥 Drop a comment to help the algorithm :)
👍 Subscribe to get notifications for the next video

-----------------
😎 Resources
-----------------
👯 TikTok
📸 Instagram
💬. Join the Discord
📜. FREE Resume Template
📕. FREE Note taking template

-----------------
👾 Important Videos
-----------------

-----------------
🧑🏻‍💻 About Me
-----------------
I am a full time SWE, with over 7 years of programming experience.
My goal is teach you the bare minimum necessary to break into tech ASAP.

Learn more about my programming journey

I offer 1 on 1 mentorship as well, feel free to DM me on discord

#coding #bootcamp #learntocode #codewithvincent
Рекомендации по теме
Комментарии
Автор

def pyramid(n):
x=1
z=n
while x<n:
print(" "*z + "*"*x)
x=x+2
z=z-1

pyramid(25)


sir is this an efficent code? as I am an beginner so i don't know

menostickman