Print stars '*' in triangle | Lesson 5 - Zero to Software Engineer Free Coding Bootcamp

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

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

Here is the question prompt:

'''
Given an input of size: n, output a
right angled triangle with n number
of rows.

EX:
n = 1
*

n = 2

*
**

n = 3

*
**
***

'''

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
Рекомендации по теме
Комментарии
Автор

Hi Vincent! This is my code for the pyramid 🙂
def pyramid(n):
spaces = n-1
for num in range(1, 2*n, 2):
print(' '*spaces+'*'*num)
spaces = spaces - 1

pyramid(10)
pyramid(5)
pyramid(25)

andypanfu
Автор

How do you do the spaces before each star to get the pyramid? Like if it's 3 rows then you would need 2 blank spaces before the 1st star and 1 blank space before the 2nd two stars, but how would you incorporate that in code?

Kenny-oi
Автор

Hi, this Question is off subject. I have a computer science degree (2004 and never used😮) and MBA(2014). Been in administration and now thinking about going back into computers. Should I pay out of pocket for classes like python and JavaScript instead of doing a boot camp? I’m really thinking about becoming a software engineer but I never used my CS. I need help with choosing the best approach.

shaniterollins