Python Pyramid Pattern Programs - Star Pattern

Pubblicato il: 18 novembre 2019
sul canale di: CodeWithAbhishek
3,549
98

Python Pyramid Pattern Programs - Star Pattern
In this video we will see the beauty of Python, printing patterns in single loop.

You can also write the below code for the above star pyramid pattern.

n=int(input("Enter The Number Of Rows: "))
for i in range(1,n+1):
print((n-i)*" "+" ".join(i*"*"))

The join() is a string method which returns a string concated with the element of an iterables(such as list,string and tuple).


In questa pagina del sito puoi guardare il video online Python Pyramid Pattern Programs - Star Pattern della durata di ore minuti seconda in buona qualità , che l'utente ha caricato CodeWithAbhishek 18 novembre 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 3,549 volte e gli è piaciuto 98 spettatori. Buona visione!