Тёмный

Python Pattern Programs - Printing Stars '*' in Pyramid Shape 

Amulya's Academy
Подписаться 216 тыс.
Просмотров 460 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 359   
@asdfghjklasdfg41
@asdfghjklasdfg41 3 года назад
Duh... give this girl a medal first of all what a way of making us understand things we don't get for months. thank you very much Amulya
@AmulsAcademy
@AmulsAcademy 3 года назад
Pleasure 😊❤️
@magicsinhindi9628
@magicsinhindi9628 4 года назад
For searching for over an year now, I was somehow able to find your videos. And actually these are the only videos out there on YT that are actually helpful for us! I am in class 11th, and will recommend this channel to every single CS student who are studying in 11th right now. Thnx for these videos...
@kratos9643
@kratos9643 3 года назад
Bro do u find this a bit hard
@nandhinirajagopal6696
@nandhinirajagopal6696 Год назад
But why do you need this in 11th std ? just curious
@AritrikRoy
@AritrikRoy Год назад
​@@nandhinirajagopal6696it is in cbse syllabus
@CinemaTablet
@CinemaTablet 3 года назад
Very nice! If you got the right triangle, check that end=" " . Between quotation marks there is a space.
@AmulsAcademy
@AmulsAcademy 3 года назад
😊😊
@shravanikeni6218
@shravanikeni6218 Год назад
Thankyou 😭❤️❤️
@narendarnani5584
@narendarnani5584 3 года назад
Thank you Amulya, ur clear explanation in every iteration, vch releaved my confusion. Hoping a great logics a head.
@AmulsAcademy
@AmulsAcademy 3 года назад
Glad to hear that :)
@durgeshrathod236
@durgeshrathod236 2 года назад
Explaination with matrix(Box) was aweosome it clears everything thanks for the video
@anuragjain3595
@anuragjain3595 3 года назад
U have a extraordinary mind,logic is amazing, amazing mind.
@medarametlapraveen
@medarametlapraveen 2 года назад
i developed a very simple code for this ..for which only one for loop is enough 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
@mohanrajkarnan3999
@mohanrajkarnan3999 6 месяцев назад
Simple and elegant
@ritechaserious
@ritechaserious 10 месяцев назад
so helpful video, so much grateful to have you as a youtube teacher
@pymondo1147
@pymondo1147 6 лет назад
Thank you. Code is perfect, those who are getting right angle triangle . Please put a space in between end ="space". Not a word just space::-p
@AmulsAcademy
@AmulsAcademy 6 лет назад
Welcome:)
@NarendiranKrishnan
@NarendiranKrishnan 6 лет назад
is it possible for you to explain why do we need a space ?
@pymondo1147
@pymondo1147 6 лет назад
Bro how much ever i type it will be still confusing. Just put the same code and debug. i will try my best by typing. Inside ith loop{ 1st jth loop will stop by giving n-1 space in the same line. if num =4, we need 3 space in 1st line , then 2 space 2nd line , 1 space 3rd line , 0 space last line. so basically inside a loop 1st jth loop will give spaces till n-1. 2nd jth loop appends * and space. Once both gets over. We need to break out of that line . So used printf()
@veereshkumar111
@veereshkumar111 5 лет назад
Bro i tried below query but i am getting below output num = int(input("Enter the number of rows:")) for i in range(0,num): for j in (0,num-i-1): print(end=" ") for j in range(0,i+1): print("*",end=" ") print() Output : * * * * * * * * * * * * * * *
@MRCRAZY-wm4ln
@MRCRAZY-wm4ln 3 года назад
mam thanks for such best tutorials and explanation in every video to master the concept !!! thanks for such a treasure.
@AmulsAcademy
@AmulsAcademy 3 года назад
Thank you so much :)
@trapartztm2119
@trapartztm2119 6 лет назад
That one person who uses the paint program to help us understand. I salute you for doing so. However, rumours say that the paint program will be removed! What program will you use next? Great video by the way! Helped me a lot in my work!
@AmulsAcademy
@AmulsAcademy 6 лет назад
Thank you so much:) Now i am using ms word:)
@karthikeyan-lv6wu
@karthikeyan-lv6wu 4 года назад
this is the best women( or girl) teaching channel.
@AmulsAcademy
@AmulsAcademy 4 года назад
Thank you :)
@ojface
@ojface 5 лет назад
You explained using row and column which i believe helped me understand this better. Thank You!
@AmulsAcademy
@AmulsAcademy 5 лет назад
My Pleasure :)
@saurabhbehere5435
@saurabhbehere5435 4 года назад
last function was very easy & explanatory. Thank you.
@rudrarajkadel1994
@rudrarajkadel1994 3 года назад
Try for less complexity : n = int(input()) row = 1 while row
@syedalifathima4471
@syedalifathima4471 5 лет назад
In this python programming for printing stars we can make use of "while loop" but you can't make use of "while loop " And my suggestion is both "while loop" and" for loop" also plzz update that also
@AmulsAcademy
@AmulsAcademy 5 лет назад
Using while loop: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-P-mCpH5f3js.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-P2Gs2U2_sHI.html :)
@aryanshroff8653
@aryanshroff8653 3 года назад
@@AmulsAcademy thank you
@sebythomas9927
@sebythomas9927 4 года назад
this also works e = 6 for t in range(1,6): for y in range(1,e-t): print(end=' ') for y in range(1,t+1): print('*',end=' ') print() output * * * * * * * * * * * * * * *
@chungyejoon4
@chungyejoon4 8 месяцев назад
Syntax error is showing for second loop End=' ' this one is showing as invalid syntax
@radhadontidonti9136
@radhadontidonti9136 Месяц назад
All stars in one line
@dollypatel692
@dollypatel692 7 лет назад
THANK YOU SOO MUCH I LEARN LOTS OF THINGS IN THIS VIDEO.
@AmulsAcademy
@AmulsAcademy 7 лет назад
Welcome:)
@padmaraogollapalli91
@padmaraogollapalli91 7 лет назад
Hi , I am print the pattern like below: A A B B C D D E F G But from my output why its coming like this .i mean why adding None Enter no of rows:4 A A B B C D D E F G None Program is: def requiredrows(num): #num=int(input("Enter the number of rows :")) ASCII=65 for i in range(0,num): for j in range(0,num-i-1): print (end=" ") for j in range(0,i+1): value=chr(ASCII) print ((value), end=" ") ASCII=ASCII+1 ASCII=ASCII-1 print (" ") num=int(input("Enter no of rows:")) print(requiredrows(num)) Could U please respond in mail padmarao.gpr@gmail.com
@tarungupta1781
@tarungupta1781 4 года назад
Good Dolly
@fardeenniyazi6090
@fardeenniyazi6090 5 лет назад
your voice is so sweet and you explaination is great
@varaprasad5091
@varaprasad5091 6 лет назад
this is my program mam/sir num=int(input("enter the no.of rows")) for i in range(0,num): for j in range(0,num-i-1): print(end=" ") for j in range(0,i+1): print("*",end=" ") print()
@AmulsAcademy
@AmulsAcademy 6 лет назад
Try this: num=int(input("enter the no.of rows")) for i in range(0,num): for j in range(0,num-i-1): print(end=" ") for j in range(0,i+1): print("*",end=" ") print() for loop placement is very important :)
@RRRRRR-ll4zd
@RRRRRR-ll4zd 5 лет назад
@@AmulsAcademy hi madam My question is A= """what are you doing How are you I'm fine """ I want output : how many lines How many characters How many words in this string??
@albinjohnson4948
@albinjohnson4948 5 лет назад
i think without using too much calculations we can simply execute it like this: using for loop: raw=int(input("enter the number of raw ")) s=raw-1 for num in range(1,raw): print(" "*s,"* "*num) s-=1 using while loop: raw=int(input("enter number of raw ")) num=1 s=raw-1 while num
@dota2gammingfun93
@dota2gammingfun93 4 года назад
@@devilrater8434 Its printing dude, you need to check
@theweekndincludesthursdays8016
@theweekndincludesthursdays8016 4 года назад
Do you know how to do this upside down?
@nish3003
@nish3003 4 года назад
you are a genius! here is a like from me
@tulsidon2157
@tulsidon2157 2 года назад
u=int(input("Enter: ")) a=0 for i in range(1,u+1): for j in range(1,(u-i)+1): print(end=" ") while a!=(2*i-1): print("*",end="") a+=1 a=0 print()
@user-mj8nn6ek5l
@user-mj8nn6ek5l 5 лет назад
It's very helpful. Thank you so much and please keep on helping us like this ma'am.
@AmulsAcademy
@AmulsAcademy 5 лет назад
Pleasure :)
@krothapallisrinath8604
@krothapallisrinath8604 5 лет назад
TQ u so much sir exam mundu casual ga chusa kani Idi maku 7 marks ki adigaru
@krishnajadhav867
@krishnajadhav867 5 лет назад
Nice elaboration thank you..also cute voice
@AmulsAcademy
@AmulsAcademy 5 лет назад
Thank you :)
@marcusmorrow3900
@marcusmorrow3900 5 лет назад
to fix your right triangle to a pyramid add a space between the quotation marks in the second for loop, in the print statement. hope this helps.
@lckstan4907
@lckstan4907 5 лет назад
Dude you just saved my ass. Thanks so much!
@chetnadangwal2
@chetnadangwal2 3 года назад
@@lckstan4907 didn't work dude It sucked
@homemusicdj132
@homemusicdj132 4 года назад
bahut badiya, bahut hard mza aaya gya dekh kar
@sumitgupta.0016
@sumitgupta.0016 7 месяцев назад
excellent explanation , thank tou soo much
@agshsf8900
@agshsf8900 4 года назад
for triangle best and single for loop function is def newStar(): inp=int(input("Please enter the number of rows")) for i in range(0,inp+1): print(' '*inp,end="") print('* '*i) inp-=1 try karo sabse easy
@creativecore3575
@creativecore3575 3 года назад
These videos are so helpful !!
@AmulsAcademy
@AmulsAcademy 3 года назад
Thank you :)
@joyprokash4013
@joyprokash4013 Год назад
Thanks a lot. Please make videos on algorithms also.
@veereshkumar111
@veereshkumar111 5 лет назад
Hi Amulya, i have tried your query but i didn't get correct output which you have shown in video num = int(input("Enter the number of rows:")) for i in range(0,num): for j in (0,num-i-1): print(end=" ") for j in range(0,i+1): print("*",end=" ") print()
@AmulsAcademy
@AmulsAcademy 5 лет назад
num = int(input("Enter the number of rows:")) for i in range(0,num): for j in range(0,num-i-1): print(end=" ") for j in range(0,i+1): print("*",end=" ") print() in the first for loop you missed range() for j in (0,num-i-1): :)
@veereshkumar111
@veereshkumar111 5 лет назад
@@AmulsAcademy after num variable, I have mentioned for loop with range(0,num)...pls check in above code and also pls let me know the incremental scenario
@AmulsAcademy
@AmulsAcademy 5 лет назад
yes you execute my code and see :)
@veereshkumar111
@veereshkumar111 5 лет назад
@@AmulsAcademy Thanks Amulya..got the output
@sreebagvath4266
@sreebagvath4266 7 лет назад
for i in range(n): print(" "*(n-1-i)+"* "*(i+1))
@sampathkumar3523
@sampathkumar3523 6 лет назад
Sree Bagvath n=20 for i in range (1,11): print (' '*(n-i)+'* '*(i))
@goldisingh8965
@goldisingh8965 5 лет назад
Don't u think it is wrong
@RohitVaghasia23
@RohitVaghasia23 4 года назад
pls explain working of print function? is it doing addition of two arguments?
@sanoopksanu8623
@sanoopksanu8623 5 месяцев назад
This also Work num=int(input("Enter the number: ")) for x in range(1,num+1): for y in range(1,num-x+1): print(end=" ") for j in range(1,x+1): print("*",end=" ") print(" ")
@reddygopichand2002
@reddygopichand2002 2 года назад
Simple ans: n=int(input()) for x in range(1,n+1): print(" "*(n-x)+"* "*x)
@MyFlabbergast
@MyFlabbergast 5 лет назад
For those who understand row/col context better than i/j :: # 'n' indicates number of rows & execute function as 'pattern(5)' def pattern(n): for row in range(n): for col in range(n-row-1): print(end=" ") for col in range(row+1): print("*", end=" ") print()
@kaousalyaadala2001
@kaousalyaadala2001 4 года назад
why we can't give print(" ",end=" ") i tried this but i got error
@5g3yashwanth96
@5g3yashwanth96 3 года назад
Nice explanation
@AmulsAcademy
@AmulsAcademy 3 года назад
Thank you :)
@vikasyaduvanshi2222
@vikasyaduvanshi2222 3 года назад
Well explained thanx for the video
@sonicthehedgehog3603
@sonicthehedgehog3603 5 лет назад
Decent Video, it really helped me. Thanks soooo much!!!
@AmulsAcademy
@AmulsAcademy 5 лет назад
Pleasure :)
@profiteducation8226
@profiteducation8226 2 года назад
num = int(input('Enter the colums you want ')) for i in range(num): for j in range(num-i): print(end=' ') for k in range(num-j): print('*',end=' ') print()
@MAX-LC
@MAX-LC 6 месяцев назад
we can use only single for loop; n=4 for i in range(n+1): print(‘ ‘*(n-i-1)+(’* ’*i+1)) print() ❤❤
@Kumar08
@Kumar08 2 года назад
Very helpful vedios
@adityadhal1817
@adityadhal1817 5 лет назад
Thank You.. I Learn a Lot..
@AmulsAcademy
@AmulsAcademy 5 лет назад
My pleasure :)
@lettingitrip5854
@lettingitrip5854 7 лет назад
love these videos! thank you so much!
@AmulsAcademy
@AmulsAcademy 7 лет назад
Welcome:)
@BabaMalik2121
@BabaMalik2121 4 года назад
side=int(input()) c='*' for i in range(side): print((c*i).rjust(side-1)+c+(c*i).ljust(side-1))
@radhadontidonti9136
@radhadontidonti9136 Месяц назад
Tqqq this worked for me🎉🎉😊
@Meshots
@Meshots 4 года назад
Thank you for the wonderful explanation that i need to understand and i learned from this video....
@AmulsAcademy
@AmulsAcademy 4 года назад
Glad it was helpful!
@Meshots
@Meshots 4 года назад
@@AmulsAcademy mam but i have a doubt..... Why you use "num -i-1" It simply run with this "num -i" And it give same output
@venkatkrishnan876
@venkatkrishnan876 3 года назад
Well explained
@AmulsAcademy
@AmulsAcademy 3 года назад
Thank you 😊
@prajaktahiremath3770
@prajaktahiremath3770 Год назад
Thanks a ton Amulya ❤
@akhileshtiwari8215
@akhileshtiwari8215 4 года назад
def pyramid(rows): for i in range(rows): print(' '*(rows-i-1)+("*"+' ')*(i+1)) function need this space to be added to work properly.
@radhadontidonti9136
@radhadontidonti9136 Месяц назад
This worked for me😊
@krishnakala.r4323
@krishnakala.r4323 4 года назад
Mam it was nice
@AmulsAcademy
@AmulsAcademy 4 года назад
Thank you :)
@sweetiecutie8457
@sweetiecutie8457 5 лет назад
In some of the pattern videos in for loop you are defining the range from 1 to num, but here you are starting from 0 - pls advise the difference
@AmulsAcademy
@AmulsAcademy 5 лет назад
If you are printing star pattern you can take range from 0 or you can take from 1 also. But in number pattern, we are printing row or column value that's why i took range from 0. You can take range from 0 or 1 that's doesn't matter in some cases like in star pattern programs. write program with both range [0 and 1] and see the difference . :)
@sweetiecutie8457
@sweetiecutie8457 5 лет назад
@@AmulsAcademy thanks
@itok5532
@itok5532 4 месяца назад
n=int(input('enter no. of rows:')) for i in range(1,n+1): k=n-i for j in range(k): print(' ',end='') for 1 in range(i): print('*',end=' ') print()
@239sandhyarani3
@239sandhyarani3 2 года назад
Ardhamayyale chepuu
@ashabnaveed
@ashabnaveed 2 года назад
Shadi karou baby,,,, 😲😲😲🤗🤗🤗😳😳😍😍
@marveldc6609
@marveldc6609 4 года назад
Your program not working. It's print right angle triangle.
@AmulsAcademy
@AmulsAcademy 4 года назад
You are missing one space in second inner for loop where you are printing star.
@marveldc6609
@marveldc6609 4 года назад
@@AmulsAcademy How can i increase my logic thinking ability.
@vinospubgdairies235
@vinospubgdairies235 6 лет назад
mam the below code i used but i didnt got the perfect output n = input("enter the number of rows: ") for row in range(0,n+1): for space in range(0,n-row-1): print(" ") for col in range(1,row+1): print col, print (" ")
@AmulsAcademy
@AmulsAcademy 6 лет назад
Try this: n = input("enter the number of rows: ") for row in range(1,n+1): for space in range(1,n-row+1): print " ", for col in range(1,row+1): print col, print :)
@karthikeyan-lv6wu
@karthikeyan-lv6wu 4 года назад
i hope, now u understand ur mistake and u are a good programmer at this time : )
@sanoopksanu8623
@sanoopksanu8623 5 месяцев назад
Thank You🤩
@muhammedbasheerkk8871
@muhammedbasheerkk8871 3 года назад
Can you create a video of "programming telegram bot in python" ?
@billyxmcwire
@billyxmcwire 3 года назад
Thank you
@AmulsAcademy
@AmulsAcademy 3 года назад
You're welcome :)
@sheikhhaji7339
@sheikhhaji7339 4 года назад
thx very helpful for exm
@AmulsAcademy
@AmulsAcademy 4 года назад
Pleasure :)
@papie5151
@papie5151 4 года назад
Can you please explain why you'd include -1 and +1 in the nested loops "for j in range(0, num-i -1) and for j in range(0, i+1) . Thank you.
@papie5151
@papie5151 4 года назад
Answered my own question after watching the video about 10 times lol. Yes!
@Rooster-777
@Rooster-777 11 месяцев назад
n=int(input("enter a number:")) for i in range(0,n): #pyramid-PATTERN print(" "*(n-i),"* "*i) Use this code to reduce execution time👍 if you understand this code YOU can write code for REVERSE-pyramid also very easyleeeeeee.
@d12kiem7
@d12kiem7 3 года назад
def pyra(rows): for i in range(rows): print(''*(rows-i-1)+'*'*(2*i+1)) ---gave me--------------------- >>> pyra(5) * *** ***** ******* ********* ------------------------------------- what did I do wrong?
@sajerath
@sajerath 4 года назад
just a thought. Instead of i and j it will be a good idea to use name as 'space' or 'stars' so as to be more specific. coz 'i' and 'j' makes no sense and makes it hard to understand
@VikrantJadhav-bt8cb
@VikrantJadhav-bt8cb 2 года назад
Well explained 🙏❤️
@rawatsaheb220
@rawatsaheb220 4 года назад
Your voice is so sweet
@AmulsAcademy
@AmulsAcademy 4 года назад
Thank you :)
@rajendramaurya4532
@rajendramaurya4532 4 года назад
def pyramid(row): for x in range(1,row+1): print(" "*(row-x),("*"+' ')*(x))
@abhishekanand5893
@abhishekanand5893 6 лет назад
Mam jaise first row me 3rd position pr star print ho gya to uske bd direct row 1 me aa jayenge hum ya phir first row me jo star print hua hai uske bd bhi jo 3 space dikh rhe wo print krke next row me aayega .....
@AmulsAcademy
@AmulsAcademy 6 лет назад
direct row 1 me aajayega:) star ke baad ki space ko print karne ki jarurat nahi hai:)
@abhishekanand5893
@abhishekanand5893 6 лет назад
@@AmulsAcademy thankuu mam
@sahil-singh22
@sahil-singh22 3 года назад
Could you explain for odd matrix or triangle ? I mean ask the user to enter n = 3,5,7.....odd numbers
@AmulsAcademy
@AmulsAcademy 3 года назад
I will try :)
@manikandanms3053
@manikandanms3053 5 лет назад
mam in the program you explained in this tutorial video...... in the for loop i.e, Eg for j in range (0,3) print ("*",end =" ") The output expected is... * (space) * (space) * (space) (Space)----> " " but the output is like.. * * * * Why this happens?? Is this because of end = " " at the end of print i.e, print ("*" , end =" ")
@AmulsAcademy
@AmulsAcademy 5 лет назад
for j in range (0,3) print ("*",end =" ") Here for loop will execute like this: first j=0, so print("*",end=" ") will be executed. so it will print * and we can see end =" " so it will print space after star so we will get *(space)__ and control is still in the same line. j=0 ------------------------- *(space) Next again for loop will execute for j = 1, so it will again execute print("*",end=" ") so we will get j=0 j=1 --------------------------------------------------------------------------------- *(space) *(space)__ and control is still in the same line. Next again for loop will execute for j = 2, so it will again execute print("*",end=" ") so we will get j=0 j=1 j=2 --------------------------------------------------------------------------------- *(space) *(space) *(space)__ and control is still in the same line. Next for loop range is covered so it will come out of the loop, next in the program you can see print(), so now control will go to the next line. j=0 j=1 j=2 --------------------------------------------------------------------------------- *(space) *(space) *(space) ___ it will print next star in the next line. *Note : __ for showing where control is present.
@manikandanms3053
@manikandanms3053 5 лет назад
@@AmulsAcademy Mam but i can't understand in this case... i.e , in the same program you explained in this tutorial video... a particular part alone i mentioned below for i in range (0 ,1): for j in range (0 , 3) : print (end = " ") for j in range (0,1): print (" * " , end = " ") print () then the output i expected is (space) (space) (space ) //1st j loop * ( space ) //2nd j loop But the output got is (space) (space) (space) * (space) Please explain this alone mam !!!
@rajeshs2840
@rajeshs2840 5 лет назад
In India its Know as Rangoli competition code is:- n = int(input("Enter the number of rows")) print(" ".join([str("* "*i).center(n*2) for i in range(1,n+1)]))
@programming991
@programming991 3 года назад
x = 5 for i in range(1, x+1): print(f"{(x - i) * ' '} {i * 'x '} ")
@AjayVerma-bb6ly
@AjayVerma-bb6ly 6 лет назад
n=1 * * n=2 * * * * *** n=3 * * * * *** * * * ***** solution for this pattern in python
@AmulsAcademy
@AmulsAcademy 6 лет назад
which pattern is this? can you give more detail:)
@AmulsAcademy
@AmulsAcademy 6 лет назад
Hey You can send me the screen shot of pattern in our fb page:)
@Gaibo47
@Gaibo47 2 года назад
my whole focus on your pronounciation 😄
@pulsarbala9988
@pulsarbala9988 5 лет назад
mam..i practised this program but i does not give me a triangle..it gives straight line stars. enter the number:3 * * * *
@AmulsAcademy
@AmulsAcademy 5 лет назад
I think you missed end ="" if not give me the program and also mention which python version you are using :)
@user-fx8ou5ly1l
@user-fx8ou5ly1l 4 года назад
I think its indentation error...for ne also it came...
@CubingPorium
@CubingPorium 4 года назад
It's not coming only enter any num is coming and when I put value it says error please suggest
@AmulsAcademy
@AmulsAcademy 4 года назад
Give me the program i will check :)
@CubingPorium
@CubingPorium 4 года назад
@@AmulsAcademy how will I give
@CubingPorium
@CubingPorium 4 года назад
On email
@softsolutions6668
@softsolutions6668 4 года назад
You made this complex
@nehaaadarsh
@nehaaadarsh 5 лет назад
Thank you mam
@AmulsAcademy
@AmulsAcademy 5 лет назад
Pleasure :)
@jayaramjs4168
@jayaramjs4168 3 года назад
Sir ,how to increase these logical thinking skill
@AmulsAcademy
@AmulsAcademy 3 года назад
I think by solving programs :)
@kbsuthar4716
@kbsuthar4716 5 лет назад
Hello Ma'am please solve this problem Que:- Write unix `cat -n` equivalent command that will display the contents of the file along with line number of each line. # Complete the following display() method to display the file that is passed to the method. # # For example when passed a file with following content, # # line 1 # line 2 # line 3 # # It should produce following output. # # 1: line 1 # 2: line 2 # 3: line 3 # # To run the program, pass it an extra argument of file name that needs to be displayed for example if you want to display file program-1.py execute following command,
@chamikaonyt
@chamikaonyt 3 года назад
Thanks madam.
@shivabhurewar4624
@shivabhurewar4624 5 месяцев назад
From where can we understand that we should range logic ..(0…num-i-1
@praveenkumar-vz7vz
@praveenkumar-vz7vz 3 года назад
I don't no why in my program columns are increasing * ** ***** **** ** why it is getting like that no space before star am not getting in pyramid shape even though copy past result is same
@AmulsAcademy
@AmulsAcademy 3 года назад
You need to print space (inside the first for loop )
@devashrafulislam
@devashrafulislam 3 года назад
num=int(input("Please enter the Number:")) for i in range(0,num): for j in range(0,num-i-1): print(end="") for j in range(0,i+1): print("*",end="") print() But Start * is not show center * ** *** **** ***** like this
@madhumitharajkumar4215
@madhumitharajkumar4215 2 года назад
what should we get even number of column star
@PraveenKumar-zg3sp
@PraveenKumar-zg3sp 5 лет назад
hello mam can you clarify my dought? mam i have written exactly wt you teach but it is getting output as rght angle tringle wt is mistake
@bendyalien
@bendyalien 3 года назад
That first part does not work for me at all
@AmulsAcademy
@AmulsAcademy 3 года назад
Getting any error?
@sakshimishra4171
@sakshimishra4171 3 года назад
When to use num or num+1 on i(row) range....please answer
@AmulsAcademy
@AmulsAcademy 3 года назад
You can use both. if range starts from 1 then you need to rake num+1, if range starts from 0 then take num.
@sakshimishra4171
@sakshimishra4171 3 года назад
@@AmulsAcademy thanqq
@0SIGMA
@0SIGMA 3 года назад
Listening to new programme just to hear your voice lol
@AmulsAcademy
@AmulsAcademy 3 года назад
Thank you :)
@eshanmourya2753
@eshanmourya2753 Месяц назад
the code didnt work i dont know why stars were printed randomly
@mohd.ismail775
@mohd.ismail775 6 лет назад
my code is not working. it is giving error in { for j in range (0,i+1) } now what should i do?
@AmulsAcademy
@AmulsAcademy 6 лет назад
What is the error? Give me the full program:)
@virendersstudy-hub462
@virendersstudy-hub462 Год назад
Do not take any input from the user just print
@vinaykumarc1473
@vinaykumarc1473 13 дней назад
😂😂😂
@engineeringsucks5206
@engineeringsucks5206 2 года назад
After entering the value i.e, no. Of row Output is not showing there
@lavakumar3243
@lavakumar3243 6 лет назад
Excuse me your videos are good but I have a doubt in this question what if we write print(" ",end=" ") instead of (end=" ") in line number 4 I.e is in first j loop
@AmulsAcademy
@AmulsAcademy 6 лет назад
hey, print(end=" ") this line is to print space , so, you can write like this, print(" ",end="") that is space and end is equal to empty string. We use end="" because we want to keep the control in the same line if you write print(" ",end=" ') that is print space and end is equal to space it will take double space and in the program we want single space so you can write print(end=" ") or you can write print(" ",end="") Thank you:)
@MaulikSrivastava
@MaulikSrivastava 5 лет назад
Make sure there is no space between those quotation marks and you're good
@MUKIT71
@MUKIT71 4 года назад
Speaking the God language yes i got an A because of this
@chungyejoon4
@chungyejoon4 8 месяцев назад
x=int(input("enter no.")) for i in range(0,x): for j in range(0,x-i-1): print(end=" "): for j in range(0,i+1): print("*",end=" ") print() Idk why this code is not running showing error
@DashingDev
@DashingDev 8 месяцев назад
After 1st print u have put a semicolon (:)
@chungyejoon4
@chungyejoon4 8 месяцев назад
Sorry , I didn't noticed it Thanks bro
@jhonjhon5952
@jhonjhon5952 6 лет назад
great job
@AmulsAcademy
@AmulsAcademy 6 лет назад
Thank you:)
@studyrj404
@studyrj404 5 лет назад
Mam how to print 1+1/2+1/3.......n terms
@rubenraj8538
@rubenraj8538 5 лет назад
Mam i am getting right triangle shape in Python3
@fauziarahman6018
@fauziarahman6018 5 лет назад
Try this- n=int(input("enter the number of rows:") for i in range(0,n): for j in range(0,n-i-1): print(end=" ") for j in range(0,i+1): print("*",end=" ") print(end=" ") print()
@RelaxHERE-zk8ts
@RelaxHERE-zk8ts 5 лет назад
Thanks so much
@saranyab6136
@saranyab6136 6 лет назад
n=int(input("enter the number of rows:")) for i in range(n+1): print(" "*(n-i)+"* "*(i))
@AmulsAcademy
@AmulsAcademy 6 лет назад
it will work properly :) But the first line of the output is empty please check and try to remove that :)
@VivekKumar-rm4td
@VivekKumar-rm4td 5 лет назад
@@AmulsAcademy if u take for i in range(1,n+1): the first line empty problem will be solve
Далее
Solve any Star Pattern program in Python
18:44
Просмотров 994 тыс.
новое испытание
00:40
Просмотров 351 тыс.
Solve Any Pattern Question With This Trick!
57:20
Просмотров 2,5 млн
Python Program #40 - Pyramid Star Pattern in Python
8:03
Python Special Programs - Full Pyramid of Stars
20:06