Printing Stars "*" in Pyramid Shape | Triangle | Python Pattern Program
Вставка
- Опубліковано 30 лип 2020
- In this python programs video tutorial you will learn to print stars in pyramid shape in detail.
We used Nested for loops to write this program.
Printing Stars in Right Triangle Shape (mirror image)
• Printing Stars "*" in ...
Printing Stars in Right Triangle Shape:
• Printing Stars "*" in ...
Printing Stars in Inverted Right Triangle Shape
• Printing Stars "*" in ...
#PythonPrograms #PatternProgram
You can Checkout:
ProgramsAndMe
programsandme
very well explained! saw so many videos but this was the easiest to understand :)
excellent explanation, not only for this questions but also help me to do other printing star pattern questions
loved it ! thank u for teaching us !
Excellent explanation of logic the best channel for learning about patterns
You got one more subscriber 😊 Thanks very helpful
Great explanation with a beautiful voice.Thanks
Amazingly Explained thanks
Thank you mam.. This is the best video i got ❤
What a nice explanation!!!
what an awesome explanation
Awesome Video and Good Explanation
Wow th way of explaining pyramid star very nice
Ty bro, was about to give up ❤
Very Good explanation sister 😊
Thnks mam what a wonderful and simple explanation ❤
Hats off super mam
Simple explanation
good explanation madam
Nice explanation
thankyou all doubt clear
You are the best ❤
Thank you.
Thank you!
apka dhanyawaad
Loved your explanation..
this was more good than our teacher
This is really an excellent channel on Python like "techie talkee"
Very helpful tutorial
thank you 😊
thanks a lot
Wah bete mauj kardi.
This is the short code that I have never seen in another videos and websites
Good explanation
n = 5
i = 1
while i
Usefull
Thnx mam
Thanks
bro thanks very good video
Thanks ❤ dear
your voice is very nice
Wow
Excellent I understood please help in fubunocci
👍👍👍👍
Great
Thank you :]
like your videos and voice tooo👍❣
Good explanation 😁
Thank you 😊
Thanks madam 😊
Is it possible to print an isosceles triangle?
Give me the pattern :)
this is an iscosceles already bro
Hello newbie here maam. it show the full pyramid and the right.. what about the left? Thank u
See, the code in the video is unnecesarily long
n = int(input("No. of rows required: "))
for i in range(1,n+1):
m = n-i
print("-"*m, end="")
print("x "*i)
Try this
Which platform is she using here?
Please explain hollow pymarid
# Generating Hollow Pyramid Pattern Using Stars
row = int(input('Enter number of rows required: '))
for i in range(row):
for j in range(row-i):
print(' ', end='') # printing space required and staying in same line
for j in range(2*i+1):
if j==0 or j==2*i or i==row-1:
print('*',end='')
else:
print(' ', end='')
print() # printing new line
Hi Amulya ji
Can we do it without input command?
It is possible but then yuuou can only get the pyramid for aa fixed value, ie cannot be inputed by the user
ur voice ❤️❤️❤️❤️❤️❤️
goat
this madea prarralelogram for me?
x= int(input("please enter the amount of rows you would like: "))
for i in range(x):
for j in range(x-i-1):
print(" ",end="")
for k in range(x+1):
print("#",end=" ")
print()
i developed a very simple code for this
n=int(input("no of rows required: "))
m=n-2
for i in range(1,n):
print(' '*m,end='')
print('x '*i)
m=m-1
it prints 1 layer less
its incorect
1) The Space is not printed properly( It only prints 2 spaces per row
2) One layer less
Fixed Code:
n = int(input("No. of rows required: "))
for i in range(1,n+1):
m = n-i
print("-"*m, end="")
print("x "*i)
Sol 1)It should be m - i as for 5 rows the first row needs 4 spaces and thus, in the range 1,6(1,n+1) starting value of i will be 1
hence m-i(1) = 4
this fixes the space problem
Sol 2) The range must be n+1 as the value of the range is start,end+1 hence if rows inputed is 5, for 5 rows a value of 1,6( n + 1)
Atleast you tried and most importantly, it works. Just one row lesser.
U voice is like amulya academy only
This is Amulya academy second UA-cam channel only
why do indians say 'only' after every sentence
Ur amulya academi right
Mera issi code se kuch or hi print kr rhaa h
i have an doubt
U voice match with amulya academy girl?
Yeah.. because this is my another channel 😊
@@programsandme7593 congrats ❤️🎉
U are too good in programing 🔥
@@programsandme7593 😂
@@bdof6528 🗿
😂😂😂
Not proper o/p ...
It's coming EOFerror:
Give me the program, I will check 😊
l=[]
for i in range(1,9,2):
l.append('*'*i)
for j in range(0,len(l)):
b=len(l[-1])-len(l[j])
c=int(b/2)
l[j]=" "*c+l[j]+" "*c
for p in l:
print(p)
South Indian
yennnnnnnnnnnnnnnnnnnnnn
Bro its an not yan
😂😂😂
Jab koi jyada English bolta hai
To mera dil karta hai...
English me video bana rahe ho
Or mujhe kuch ghanta samajh nahi aara
n is pronounced as yen XD
Thank you!