Print A Triangle Challenge #python #code #programming

preview_player
Показать описание
In this python tutorial, I show you how to print out a triangle using an algorithm instead of manually using print statements.

======== Ask Case Digital ========
If you have a question you would like answered,
fill out the Google form in the link below:

======== Python Tutorials ========

======== Python Questions ========

======== Video Timeline ========
0:00:00 - Print A Triangle Challenge

#CaseDigital #PythonQuestions #PythonStrings

DISCLAIMER: Some of the links here are affiliate links. This means at NO additional cost to you, I may earn a commission if you click through and make a purchase. This helps me to continue to make free content to help you on your coding journey!
Рекомендации по теме
Комментарии
Автор

The wording is the only thing that got me tricked up. "Draw this triangle" you mean "Print an increasing amount of *"

zac
Автор

a = [print("*" * i) for i in range(1, 6)]

astropgn
Автор

It's inefficient. You're regenerating the whole string over and over again. Arguably O(n²) since the string * operation hides a loop. I'd do it in O(n)

ivans
Автор

Bro I just aced my x86 assembly language & MIPS course, still can't find an internship.

Tinyjb
visit shbcf.ru