Python Pattern Program - Number Pattern (Printing Numbers in Pyramid Shape)

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • 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

Комментарии • 261

  • @МаксимБездітко
    @МаксимБездітко 3 года назад +13

    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!

  • @gauravkumar2602
    @gauravkumar2602 3 года назад +3

    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
      @AmulsAcademy  3 года назад +1

      ❤️😊

    • @gauravkumar2602
      @gauravkumar2602 3 года назад

      @@AmulsAcademy Just a request , in your upcoming videos please explain time complexity as well, while explaining algorithms.

  • @laxmikanthghali5388
    @laxmikanthghali5388 3 года назад +9

    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!!

  • @ladiyuktha6154
    @ladiyuktha6154 5 лет назад +7

    U r voice is too good to listen
    And u r explaining perfectly

    • @ladiyuktha6154
      @ladiyuktha6154 5 лет назад

      I want some more patterns like this☺️☺️

  • @vikaskait5057
    @vikaskait5057 5 лет назад +7

    Mam your teaching is awesome.. I really love your teaching.. Mam I want python program for "pascal's triangle" will you please mam..

  • @sayanrc5131
    @sayanrc5131 5 лет назад +8

    Can u please upload some harder patterns? It would be a great help.
    And thanks for this one...it really helped a lot

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад +2

      Ok :)

    • @shesharajupallysaikumar904
      @shesharajupallysaikumar904 4 года назад

      ​@@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

    • @nandalala7915
      @nandalala7915 4 года назад

      @@shesharajupallysaikumar904 that is double digit 10

  • @muralikonkoth4161
    @muralikonkoth4161 3 года назад +4

    Great.Well explained for beginners.Thanks a lot for sharing knowledge.

  • @hemantheswar8118
    @hemantheswar8118 4 года назад

    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......

  • @trendingvedio7564
    @trendingvedio7564 3 года назад +2

    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

  • @frankhuman9972
    @frankhuman9972 4 года назад +4

    Simply you’re a genius

  • @shivanshsrivastava1715
    @shivanshsrivastava1715 4 года назад +1

    Ur explanation is crystal clear 👍

  • @harin1846
    @harin1846 5 лет назад +3

    Can you explain how one can code to print Binomial Distribution or Pascal's Triangle, like 1, 11, 121, 1331, etc? Thank you.

  • @Miguel-qw6bn
    @Miguel-qw6bn 3 года назад +1

    Thank You for supporting !

  • @babjiky
    @babjiky 4 года назад +3

    Hi, I started learning python... Too good lesson... Really thanks to U..

  • @tejasvimangal2184
    @tejasvimangal2184 2 года назад +2

    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, " "))

  • @creativesangeeth8343
    @creativesangeeth8343 4 года назад +1

    Absolutely ur good teacher in python

  • @doyouknow243
    @doyouknow243 3 года назад +2

    You explain very well mam 😊

  • @praveenboddu3629
    @praveenboddu3629 5 лет назад +4

    Explanation is simply superb Ms.Amulya :-)

  • @alaranaprathap1891
    @alaranaprathap1891 5 лет назад +2

    Really very good and awesome explanation

  • @mddelowarhossain1075
    @mddelowarhossain1075 5 лет назад +3

    Awesome! Please, keep posting with new programming solutions. Thank you...:)

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад +2

      Thank you :)
      Yes i will keep posting videos on new topics.
      Keep learning
      :)

  • @apexbioaccounts6375
    @apexbioaccounts6375 4 года назад +9

    Thank You for supporting us madam,,,

  • @amng518
    @amng518 5 лет назад +4

    Mam output is coming in different shape

  • @madinasushma1074
    @madinasushma1074 4 года назад +1

    Tank you so much madam. Your video help to learn Python easily

  • @AR-ut1qe
    @AR-ut1qe 4 года назад +2

    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.

  • @sameulkumar7182
    @sameulkumar7182 6 лет назад +1

    wow no words for your explanation!!!!!!

  • @karimbudhwani3004
    @karimbudhwani3004 4 года назад +1

    Thank you for this video. It helped me understand every iteration

    • @ajaypatidar2822
      @ajaypatidar2822 Год назад

      ruclips.net/p/PLFMdA1UJVR4bm0o8vTa9dcOS3_HNSP-fa

  • @sudarsandm
    @sudarsandm 6 лет назад +1

    Your videos are really good. Thanks for sharing with us.

  • @nanichinna8976
    @nanichinna8976 4 года назад +1

    Your voice is inspiring a lot

  • @gopalkrishnapanda7663
    @gopalkrishnapanda7663 6 лет назад +2

    very well explained !! thanks a lot!!!

  • @user-uv2gu8wm6h
    @user-uv2gu8wm6h 5 лет назад +2

    Great and thanks

  • @amit342kumar
    @amit342kumar 4 года назад

    Very very good voice for aur learning Python ..am realy attract.

  • @jafarbasha4394
    @jafarbasha4394 4 года назад

    Nice.. Easy to understand... Thankyou amuls

  • @jaigarage9868
    @jaigarage9868 5 лет назад +1

    Good programmer. Pls explain how to copy data from online with python xml....

  • @prathamsingh5467
    @prathamsingh5467 3 года назад +1

    Great job👨‍💻👨‍💻👨‍💻

  • @marciosilvaroballo2338
    @marciosilvaroballo2338 4 года назад +1

    hello amuls very good code, congratulations on the channel

  • @Jc-handle-with-care
    @Jc-handle-with-care 4 года назад +1

    thanks, ,you re a good teacher

  • @fahadmustafa650
    @fahadmustafa650 5 лет назад +7

    Thanks Mam
    Respect from Pakistan

  • @hariram-uu2qx
    @hariram-uu2qx 4 года назад +1

    Very nice explanation thank you 😊

  • @jagadheeshsiripurapu1555
    @jagadheeshsiripurapu1555 3 года назад +1

    In love with ur voice amulya.. plzz like me

  • @dharshinimagesh9591
    @dharshinimagesh9591 4 года назад +3

    hi mam . i understand when u teach but feel difficult to do myself . how to improve my programming knowledge .

  • @flatscales2161
    @flatscales2161 4 года назад +1

    Thank You Very Much For Such A Great Explanation : )

  • @nischaysingh
    @nischaysingh 5 лет назад +1

    such a simple explanation. keep it up

  • @abhijitdutta9846
    @abhijitdutta9846 6 лет назад +1

    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.

    • @AmulsAcademy
      @AmulsAcademy  6 лет назад

      yes you can use space or you can use format() for space management
      :)

    • @abhijitdutta9846
      @abhijitdutta9846 6 лет назад

      Amuls Academy

    • @abhijitdutta9846
      @abhijitdutta9846 6 лет назад

      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.

  • @Music.Air99
    @Music.Air99 3 года назад +1

    thank you so much mam explained great!

  • @sandeepkunwr1178
    @sandeepkunwr1178 5 лет назад +3

    Voiceeeeeee😍😍😍😍

  • @thokalarajesh9989
    @thokalarajesh9989 4 года назад

    Excellent madam it is very much interested madam tq sooooooooo much

  • @SurajPrajapati-bl5vp
    @SurajPrajapati-bl5vp 5 лет назад +1

    Nice explanation mam...

  • @bvspa
    @bvspa 3 года назад +1

    Thank you Ma'am

  • @majurakanpuvanendran732
    @majurakanpuvanendran732 4 года назад

    Easy to understand python .this video more help.pls upload php lesson video.

  • @niveditachowdhury9499
    @niveditachowdhury9499 6 лет назад +4

    instead of writing end=" "we can just put a comma also. Thanks a lot by the way

  • @Navya-s8o
    @Navya-s8o 3 года назад +2

    When I execute same program in my laptop I won't getting actual output some what am getting what's wrong?

    • @AmulsAcademy
      @AmulsAcademy  3 года назад

      Give me the program please, i will check :)

  • @ChelsiRomir
    @ChelsiRomir 3 года назад +2

    What would be the program if v wanted to print the same triangle shape but instead of numbers v wanted "*"?

  • @dharanidharb6451
    @dharanidharb6451 5 лет назад

    Mam which one do u use to compile

  • @nihalsingh9987
    @nihalsingh9987 3 года назад +1

    Very nice
    Madam👍👍👍👍

  • @krypton2780
    @krypton2780 3 года назад +1

    Mam what's your python version, I can't run it correct

  • @ankitupadhyay8701
    @ankitupadhyay8701 2 года назад

    nicely explained.good job.

  • @babjiky
    @babjiky 4 года назад +1

    Hi I have a doubt.. How to find Fibonacci number. Please can you send me code?

    • @AmulsAcademy
      @AmulsAcademy  4 года назад

      Video link:
      ruclips.net/video/wN45AChk9U4/видео.html
      :)

    • @babjiky
      @babjiky 4 года назад

      @@AmulsAcademy thanQ

  • @akashtelkar853
    @akashtelkar853 5 лет назад

    Which application Ur using to run python

  • @flatscales2161
    @flatscales2161 4 года назад +1

    awesome explaination

  • @The_WarMachine
    @The_WarMachine 3 года назад +1

    Can we reduced the numbers of code line

  • @Trends_Forever
    @Trends_Forever 4 года назад +1

    you just learn c-corner website you copy the c corner website code

  • @sofianghazali8911
    @sofianghazali8911 6 лет назад +1

    why did u add '0' in for loop(i,0,-1)? what is zero used for?

    • @AmulsAcademy
      @AmulsAcademy  6 лет назад +3

      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().

    • @sofianghazali8911
      @sofianghazali8911 6 лет назад +1

      thank you! makes sense!

    • @Ankit-mq6em
      @Ankit-mq6em 6 лет назад

      Mam I am getting wrong patterns yyyy??

    • @mukunthanloganathan5802
      @mukunthanloganathan5802 5 лет назад

      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

    • @tejas_gawali
      @tejas_gawali 5 лет назад

      if you don't put 0 there it will not show 1 in that pattern

  • @rupanisapthagiri8423
    @rupanisapthagiri8423 5 лет назад +1

    what is the difference between a while loop and for loop

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад

      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.
      :)

    • @edagottisurekha5875
      @edagottisurekha5875 5 лет назад

      While loop is used if iterations or unknown and for is used if the iterations are known

  • @adithyanvr1949
    @adithyanvr1949 Год назад

    Thank you so much Mam

  • @afees4981
    @afees4981 4 года назад +1

    @amul acedamy Hi could u explain how range (I, 0,-1)
    Works

    • @AmulsAcademy
      @AmulsAcademy  4 года назад

      if i take range(5,0,-1) it will take value as 5 4 3 2 1
      :)

  • @mahadevleela3230
    @mahadevleela3230 3 года назад +1

    Thanks a lottt

  • @RanjithKumar-jo7xf
    @RanjithKumar-jo7xf 5 лет назад +1

    Very useful one

  • @north4083
    @north4083 4 года назад +1

    THANK U !!!!!!!!!!!!!!!!!!

  • @pavankumarsv419
    @pavankumarsv419 5 лет назад +2

    Why you will not take 0th row

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад

      Because here i am printing value 1 in the first row, so i took range from 1.
      :)

  • @venkateshkarthick7935
    @venkateshkarthick7935 4 года назад

    Learning is so good

  • @mukunthanloganathan5802
    @mukunthanloganathan5802 5 лет назад +1

    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

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад +6

      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.
      :)

  • @Abhijeetchandra3089
    @Abhijeetchandra3089 2 года назад

    Why are you not uploading any video?

  • @shesharajupallysaikumar904
    @shesharajupallysaikumar904 4 года назад +1

    @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

    • @AmulsAcademy
      @AmulsAcademy  4 года назад

      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.
      :)

    • @shesharajupallysaikumar904
      @shesharajupallysaikumar904 4 года назад

      @@AmulsAcademy thanks for reply plzz share the code using format() in comments

  • @Girishhhhh
    @Girishhhhh 4 года назад +2

    maam this is also not coming
    this is the output coming
    Enter the no of rows:4
    1
    212
    32123
    4321234

    • @AmulsAcademy
      @AmulsAcademy  4 года назад

      You are not printing space.
      Check the for loop for which prints space.
      :)

  • @wildan2136
    @wildan2136 5 лет назад +1

    dear mam. i have problem here i cant shape the triangle do somebody has the same issue?

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад

      Can you share your program here i will check :)

    • @wildan2136
      @wildan2136 5 лет назад

      @@AmulsAcademy nvm i rechecked and its all fine thank u

    • @taran7954
      @taran7954 5 лет назад

      Swaraj Shimpi you didn't declare the po function

  • @arjunachu308
    @arjunachu308 3 года назад +1

    can we do the came with alphabet

  • @joyprokash4013
    @joyprokash4013 Год назад

    Thanks a lot

  • @sathishkumarm1501
    @sathishkumarm1501 5 лет назад +2

    Mam, pls post Pascal triangle program

  • @voiceofyvr4006
    @voiceofyvr4006 4 года назад +1

    can you tell that the code for * pattern

  • @SurajPrajapati-bl5vp
    @SurajPrajapati-bl5vp 5 лет назад +1

    Nice voice
    .....

  • @ferakafs
    @ferakafs 2 года назад

    Thanks a lot!!!🥰

  • @anup161091
    @anup161091 4 года назад

    Please make a program video on pascal triangle

  • @rajsingh966
    @rajsingh966 6 лет назад +1

    i want to use it opposite of it .like an arrow but its not working just help

    • @janso8463
      @janso8463 5 лет назад +2

      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()

    • @vamsimanchikanti9399
      @vamsimanchikanti9399 5 лет назад +1

      @@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()

  • @giorgibakuradze
    @giorgibakuradze 3 года назад

    how can i build the list of pyramid with different numbers

  • @vijayasarathyr394
    @vijayasarathyr394 2 года назад

    hi mam can you help me to print
    1
    2 3
    4 5 6
    and going on

  • @anontough6907
    @anontough6907 Год назад

    I love your brain ;)

  • @manojkumarjampala4745
    @manojkumarjampala4745 2 года назад

    Please make a program for palindrome number.... in python it is as asking frequently in many interviews

    • @ajaypatidar2822
      @ajaypatidar2822 Год назад

      ruclips.net/p/PLFMdA1UJVR4bm0o8vTa9dcOS3_HNSP-fa

  • @paramdeepsingh9496
    @paramdeepsingh9496 6 лет назад +2

    hello mam... i find it difficult tht how do u make concepts in different pattern. i find it really tough.... plz help

    • @AmulsAcademy
      @AmulsAcademy  6 лет назад +2

      You can write the program in different ways but you need to understand the logic first:)

  • @hellojm2403
    @hellojm2403 5 лет назад +1

    Thanks!!!

  • @kajalnegi6282
    @kajalnegi6282 4 года назад +1

    Best👍👍👍

  • @puneethas5843
    @puneethas5843 5 лет назад +1

    Pls give me suggestions how print in C program....to print value range

  • @saivsai3899
    @saivsai3899 2 года назад

    Thanks mam and small bought

  • @codopy
    @codopy 3 года назад

    how can i reverse the pattern upside down

  • @nagav261
    @nagav261 5 лет назад +2

    what is the code for 4th part

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад

      4th part is last space right?, No need to print that
      :)

    • @nagav261
      @nagav261 5 лет назад

      @@AmulsAcademy ya I know that,but I tried to print * in that space.thats y I asked uand I got it

  • @SantoshSahu-so2ji
    @SantoshSahu-so2ji 6 лет назад +1

    ur voice is so sweet

  • @jk3089
    @jk3089 4 года назад +1

    Brilliant

  • @singharminder
    @singharminder 6 лет назад +1

    good work

  • @pratipaj
    @pratipaj 2 года назад

    Please solve again full

  • @abhiShek-zi4sh
    @abhiShek-zi4sh 4 года назад

    this is better:
    c=int(input('please enter the number for this kind of structure'))
    for i in range(1,c+1,1):
    print(" "*(c-i) , end="")
    for j in range(1,2*i):
    if j

    • @nbhaskarreddy
      @nbhaskarreddy 4 года назад

      Wrong out put

    • @nbhaskarreddy
      @nbhaskarreddy 4 года назад

      try this: (you can optimize this code)
      num =int(input("Enter number of rows"))
      for i in range(num):
      for j in range((num+num)-1):
      if(j=num-(i+1) and j

  • @nageshj2050
    @nageshj2050 5 лет назад +2

    Actually, we can print the Pyramid with just one for loop

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад

      Yes we can :)

    • @ArunRajpidige
      @ArunRajpidige 5 лет назад +2

      @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

    • @ayeshamujeeb9661
      @ayeshamujeeb9661 5 лет назад

      @@ArunRajpidige I have seen that video too.