Python Pattern Program - Number Pattern (Printing Numbers in Pyramid Shape)
ฝัง
- เผยแพร่เมื่อ 11 พ.ค. 2018
- In this Python Pattern Programming video tutorial you will learn How to print numbers in pyramid shape in detail.
To print numbers in pyramid shape we will use nested for loops.
For more free tutorials on computer programming
/ amulsacademy
/ amulsacademy
you really made a hard work to make users understand in a simple way but i had to concentrate a lot to understand as your voice distracted me a lot..........your voice is god gift......
Personally I am from Ukraine and i have been looking for such a cool and skillful teacher like you for so long time. And finally i succeed. You can explain such uneasy and sometimes challenging things in a really good and easy to understand way so that I am just being amazed at your skills of teaching. With love from Ukr! The English Language is a great force. I am only 15 years old and I reckon everything is ahead!
Thank you so much :)
Nice.. Easy to understand... Thankyou amuls
This is outstanding channel, to build the logic from scratch!! Amulyaji aap ka voice, teaching style awesome, it wont distract when u are teaching. Love it it!!
Thank you so much 😀
U r voice is too good to listen
And u r explaining perfectly
I want some more patterns like this☺️☺️
Mam your teaching is awesome.. I really love your teaching.. Mam I want python program for "pascal's triangle" will you please mam..
Explanation is simply superb Ms.Amulya :-)
Best teacher !!! Thanks a lot Mam.
I tried solving this by myself , without watching your video. Hope it will help someone.
rows =8
for i in range(1,rows):
for j in range(rows-i,-1,-1):
print(end=" ")
for j in range(i,0,-1):
print(j, end="")
for j in range(2,i+1,):
print(j, end="")
print()
❤️😊
@@AmulsAcademy Just a request , in your upcoming videos please explain time complexity as well, while explaining algorithms.
Can you explain how one can code to print Binomial Distribution or Pascal's Triangle, like 1, 11, 121, 1331, etc? Thank you.
Awesome! Please, keep posting with new programming solutions. Thank you...:)
Thank you :)
Yes i will keep posting videos on new topics.
Keep learning
:)
Very very good voice for aur learning Python ..am realy attract.
Great.Well explained for beginners.Thanks a lot for sharing knowledge.
Thank you :)
Thank you for this video. It helped me understand every iteration
th-cam.com/play/PLFMdA1UJVR4bm0o8vTa9dcOS3_HNSP-fa.html
Great video! How could I do the inverse? I mean, add or score 1 in the middle instead of substracting. I am trying but I can't.
Simply you’re a genius
Thank you :)
Your videos are really good. Thanks for sharing with us.
My pleasure:)
Thank You for supporting us madam,,,
wow no words for your explanation!!!!!!
Thank you:)
Ur explanation is crystal clear 👍
Thank you :)
Your voice is lovely ❤️ and so easily you teach them all in a simple way with easy and understanding English language for new comers 🙏plz you always make this type of coding vedios we learn to you a different and good kind of logics , methods, 🙏jai shree ram 🙏, keep going on
Thank you 😊❤️
simp
nicely explained.good job.
Easy to understand python .this video more help.pls upload php lesson video.
Nice explanation mam...
Absolutely ur good teacher in python
Thank you :)
Great and thanks
In love with ur voice amulya.. plzz like me
very well explained !! thanks a lot!!!
Thank you:)
Can u please upload some harder patterns? It would be a great help.
And thanks for this one...it really helped a lot
Ok :)
@@AmulsAcademy your program was wrong (check with 10 or above value , you wont get pyramid) you can observe at 11:14 last line of output pattern was wrong
@@shesharajupallysaikumar904 that is double digit 10
Good programmer. Pls explain how to copy data from online with python xml....
Voiceeeeeee😍😍😍😍
Excellent madam it is very much interested madam tq sooooooooo much
Learning is so good
Thank You Very Much For Such A Great Explanation : )
You are welcome! :}
Tank you so much madam. Your video help to learn Python easily
Glad to hear that :)
thanks, ,you re a good teacher
Thank you! 😃
Really very good and awesome explanation
Thank you :)
Thank You for supporting !
Pleasure 😊
hello amuls very good code, congratulations on the channel
Thank you :)
thank you so much
Mam which one do u use to compile
such a simple explanation. keep it up
Thank you :)
Your voice is inspiring a lot
Thank you :)
can you please make a program for letter "C"
Hi, I started learning python... Too good lesson... Really thanks to U..
Thank you :)
Thank you so much Mam
Mam output is coming in different shape
Thanks a lot
thank you so much mam explained great!
Most welcome 😊
You explain very well mam 😊
Thank you 😊
Thanks a lot!!!🥰
Are 4 loops required?
n = int(input("Enter the number: "))
L = [x for x in range(1, n+1)]
for i in range(1, n+1):
a = list(map(str, L[0:i]))
s = " ".join(a[1:][::-1] + a)
print(s.center((4*n)-3, " "))
Very nice explanation thank you 😊
Most welcome 😊
Which application Ur using to run python
how can i build the list of pyramid with different numbers
Nice voice
.....
Thanks Mam
Respect from Pakistan
Thank you:)
Please make a program video on pascal triangle
Great job👨💻👨💻👨💻
Thank you so much 😀
When we give range(5,0) it prints in reverse order then y should we give the step as -1. Help me with this problem..plz
by default step value is +1.
when you mention range(0,5) by default it will take step value as 1 and we will get 0,1,2,3,4.
But in range(5,0) starting value is 1 and ending is 0 and you didn't mentioned step so it will take default value that is +1, so it won't print anything.
[You are telling to print values from 5 to 0 , and difference between second value and first value {step} to be +1 , it can't be possible.]
so you should mention step as -1.
range(5,0,-1): 5 4 3 2 1
difference between second value{4} and first value{5} is -1.
:)
can you tell that the code for * pattern
@amul acedamy Hi could u explain how range (I, 0,-1)
Works
if i take range(5,0,-1) it will take value as 5 4 3 2 1
:)
Why are you not uploading any video?
Thank you Ma'am
Pleasure :)
hi mam . i understand when u teach but feel difficult to do myself . how to improve my programming knowledge .
practicing
What would be the program if v wanted to print the same triangle shape but instead of numbers v wanted "*"?
in print function print star :)
awesome explaination
Glad you liked it :)
Very useful one
Thank you :)
Thanks mam and small bought
instead of writing end=" "we can just put a comma also. Thanks a lot by the way
In Python 2
In python2.
U r saying 3
Can we done this simply by comma??
Ri8
When I execute same program in my laptop I won't getting actual output some what am getting what's wrong?
Give me the program please, i will check :)
I love your brain ;)
Thanks!!!
Welcome:)
Very nice
Madam👍👍👍👍
Thank you :)
hi mam can you help me to print
1
2 3
4 5 6
and going on
THANK U !!!!!!!!!!!!!!!!!!
Welcome :)
Please solve again full
why did u add '0' in for loop(i,0,-1)? what is zero used for?
0 is the end value ,
range() syntax is range(start, end, step).
for i in range(5,0,-1) it will give output as 5 4 3 2 1 , here 0 is end value which is excluded in range().
thank you! makes sense!
Mam I am getting wrong patterns yyyy??
When we give range(5,0) it prints in reverse order then y should we give the step as -1. Crt me if i am wrong..plz
if you don't put 0 there it will not show 1 in that pattern
Madam thank you for the pattern program. But I think in all the print statements inside the for loops we need space. Otherwise pattern does not come as exact as shown in the beginning. Thank you very much.
yes you can use space or you can use format() for space management
:)
Amuls Academy
Thank you very much. How to generate Armstrong numbers. I know their are these numbers which are Armstrong but I am not able to generate it.. 153,370,371, and 407.
Thanks a lottt
Pleasure :)
how can i reverse the pattern upside down
you just learn c-corner website you copy the c corner website code
i want to use it opposite of it .like an arrow but its not working just help
I tried this:
num=9
for i in range (1,num+1):
for j in range (1,i):
print (end=".")
for j in range (num-i+1,1,-1):
print (j, end="")
for j in range(1,num-i+2):
print (j, end="")
print()
@@janso8463 num=9
for i in range (1,num+1):
for j in range (1,i):
print (end=" ")
for j in range (num-i+1,1,-1):
print (j, end="")
for j in range(1,num-i+2):
print (j, end="")
print()
good work
Thank you:)
hello mam... i find it difficult tht how do u make concepts in different pattern. i find it really tough.... plz help
You can write the program in different ways but you need to understand the logic first:)
Mam, pls post Pascal triangle program
ok:)
what is the difference between a while loop and for loop
While loop will execute block of code until a certain condition is met.
For loop is used to iterate over elements of a sequence. It will executes block of code "n" times.
:)
While loop is used if iterations or unknown and for is used if the iterations are known
Pls give me suggestions how print in C program....to print value range
dear mam. i have problem here i cant shape the triangle do somebody has the same issue?
Can you share your program here i will check :)
@@AmulsAcademy nvm i rechecked and its all fine thank u
Swaraj Shimpi you didn't declare the po function
Best👍👍👍
Thank you :)
Can we reduced the numbers of code line
Yes you can :)
Brilliant
Thank you :)
ur voice is so sweet
Thank you:)
Please make a program for palindrome number.... in python it is as asking frequently in many interviews
th-cam.com/play/PLFMdA1UJVR4bm0o8vTa9dcOS3_HNSP-fa.html
Aapki aawaz kinni payari hai 😍😘
Thank you mam for your brief explanation
Mam what's your python version, I can't run it correct
Python 3
@@AmulsAcademy thank you
can we do the came with alphabet
Yes :)
Hi I have a doubt.. How to find Fibonacci number. Please can you send me code?
Video link:
th-cam.com/video/wN45AChk9U4/w-d-xo.html
:)
@@AmulsAcademy thanQ
#shortest code ever
i=1
r=4
for j in range(1,5):
for p in range(0,r):
print(" ",end="")
print(i*i)
i=i*10+1
r=r-1
Actually, we can print the Pyramid with just one for loop
Yes we can :)
@Anirvan Sen j=9 #variable used for denoting spaces
n=int(input("enter how many rows of stars you want to print:"))
for i in range(1,n,2):
print(' '*j+i*'*')
j=j-1
@@ArunRajpidige I have seen that video too.
@Amuls Academy your program was wrong (check with 10 or above value , you wont get pyramid) you can observe at @11:14 last line of output pattern was wrong
Program is not wrong , Because 10 and above has 2 digits output looks like that.
You can format the output using format() and you can get proper shape.
:)
@@AmulsAcademy thanks for reply plzz share the code using format() in comments