Python Pattern Program - Printing Numbers in Square Shape

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2024

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

  • @jrk608
    @jrk608 6 лет назад +14

    Hi
    You are helping a lot to every one who ever want to learn python.
    Could you please teach about some files related programs and regex if u possible .
    your explanation is very clear

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

      Thank you:)
      I have made some videos on regular expression :)

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

    Explanation is too gud
    Subscribed
    After seeing this video I feel that I wasted my time in other RUclips channels

  • @alexandertenenbein2783
    @alexandertenenbein2783 5 лет назад +12

    Your explanations are very clear and you are very helpful. How would you do this program using recursion?

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

    Thanks for this! Your explanations are much easier to understand than my lecturer. subscribed.

  • @RanjanaDevi-zg8zd
    @RanjanaDevi-zg8zd 4 года назад +4

    Hi
    Good evening mam
    You are helpful for programming pythons . and I am learning your RUclips classes.
    Thank u so much mam

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

    PTA nhi kyu log dislike kr dete hai mam aap bahut acchi batati hai..aur aapki voice lovely and attractive hai..thank you to provide such wonderful video...

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

    Your videos are one of the best on you tube for learning python and practicing. You explain really very well, problems with their concepts.
    Please make videos on python hackerrank or codechef problem.
    Also please try to make videos on python for data science

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

    so glad that i found your videos....awesome work maam...thanks a lot !!!!!!!!!

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

    Really I like your teaching wow it's awesome and I can understand easily in Python

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

    Thank you so much , your explanations are crystal clear .please do make videos on all types of python programming like files as well.Looking ahead to get such more videos form your end.

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

    Clearly explained and Presentation is also very good.
    Thank you

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

    Very easily explained and plz never stop

  • @krish_unni
    @krish_unni 6 лет назад +11

    Mam, provide videos for Python with database. It would be useful for every beginners.

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

    Your explanation is very good and please make a video for python for data science

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

    thank u so much .am so lucky to find such a good channel for python. .thank u so much .plz keep going . if possible plz update prgm regarding machine learning..

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

    Amulya where are you now!
    You need for Pythonists?
    Please come back and live with this channel.
    Thank you for your work.

  • @Harvindersingh-hb7cb
    @Harvindersingh-hb7cb 2 года назад

    Lots of thanks amulya ma'am...🙏

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

    Thank you! I was able to learn python easily with your help ^^ Also, pls do face reveal :D

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

    Ur explanation is good and if you can do this program in c then its help to us

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

    Thank you! Awesome explanatory video! Easy to understand seemingly tough concept.

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

    Awesome mam... Thank you So much... Great Explaination.....

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

    Nice Explanation. Thanks Subscribed and liked.

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

    Good explanation thank you Amuls Academy

  • @HariRam-ox3sx
    @HariRam-ox3sx 4 года назад +2

    What an explanation! You are simply superb 😍

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

    your voice is so relaxing :) and very informative hope to see more !
    by the way can we make a program a 5x5 table that can show the out put of per column and per row?? thanks a lot!!

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

      I guess it is kinda randomly asking but does anybody know a good place to stream new series online ?

  • @Богвтелечеловека
    @Богвтелечеловека 2 года назад

    Thanks a lot. The program works well for a square matrix (isosceles square)
    and if the matrix is not square and there are two input numbers?
    And numbers can be less than 3
    Example: 5, 7; 8.6; 7.2; 1.8.

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

    Great Effort, thanks alot

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

      Pleasure :)

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

      @@AmulsAcademy welcome

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

      @@AmulsAcademy Mam I need help in few questions How can i contact you? Please provide me any source for contact.

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

    Hi there. First of all congratulations on your videos, they help a lot people like me, begginers! Second in this program, if we change the variables for the numbers that they represent, why doesn't the code work!? if we change low for 0, or high by 4 the code stops working well! Why?

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

      Thank you :)
      When you use high as 4, getting any error ? Or wrong output :)

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

      @@AmulsAcademy Thank you for your feedback! 👏 I'm not getting error, i'm getting wrong output! This is the code with the modifications i made:
      """
      Printing Numbers in Square Shape
      """
      # creating nested lists
      num = int(input("Enter a number: "))
      nested_list = [[0 for i in range(num)] for y in range(num)]
      n = 1
      low = 0
      high = num - 1
      count = int((num + 1) / 2)
      for i in range(count):
      for j in range(0, 5): # where i traded low for 0 and high + 1 for 5
      nested_list[low][j] = n
      n += 1
      for j in range(1, 5): # where i traded low+1 for 1 and high + 1 for 5
      nested_list[j][high] = n
      n += 1
      for j in range(3, -1, -1): # where i traded high-1 for 3 and low-1 for -1
      nested_list[high][j] = n
      n += 1
      for j in range(3, 0, -1): # where i traded high-1 for 3 and low for 0
      nested_list[j][low] = n
      n += 1
      low += 1
      high -= 1
      for i in range(num):
      for j in range(num):
      print(nested_list[i][j], end='\t')
      print()
      This is the output i got:
      Enter a number: 5
      1 2 3 4 5
      17 32 48 22 21
      45 44 47 42 37
      29 30 46 26 8
      13 12 41 25 9

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

    mam will you recommend such questions for beginners ?

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

      It is a simple program, you can understand it easily 😊

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

    Many Thanks Madam

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

    Thank you mam this is very nice

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

    Python makes life easier

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

    Mam you can also make a video of printing a pattern in which the sum of rows ,cols and diags should be same

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

    Could this program be done in fewer steps using lambda, map, filter, and/or reduce?

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

      You can try and share with us :)

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

      @@AmulsAcademy can i have ur insta id??

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

    U r great

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

    Osm.......

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

    thank you so much mam

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

    thanks so much!

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

    Can we so this by swapping method????

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

    thank you

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

    Hai madam
    Have you any python material

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

    Hello from Argentina!! great video,! i do the same but it show me " List assignment index out of range " id check the range already but i cant find the error :( help!

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

      Give me the program i will check :)

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

      @@AmulsAcademy
      n = int(input("Tamaño de la matriz N x N: "))
      count = int((n+1)/2)
      high = n-1
      low = 0
      i=1
      matriz = [[0] * n for f in range(n)]
      for f in range(count):
      for c in range(low,high+1):
      matriz[f][c]=i
      i+=1
      for c in range(low+1,high+1):
      matriz[c][high] = i
      i+=1
      for c in range(high-1,low-1,-1):
      matriz[high][c]=i
      i+=1
      for c in range (high-1,low,-1):
      matriz[c][low]=i
      i+=1
      low+=1
      high+=1

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

      @@AmulsAcademy i just found the error. i did this high = high + 1 instead high =high-1 hehehe... Thank you! you are awesome!

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

    Can I know how to make sequenced squares but from the inside not the outside like this?

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

    Can u pls say me how to reduce the no.of loops

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

    In 4th for loop I did not understand Y we are using low-1..it should be till low+1 ryt, because we need low cell to be printed.. Madam please let me clear this in a more simple way

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

    can you please tell me name of the compiler

  • @Adarsh.kashyap
    @Adarsh.kashyap 5 лет назад

    can you do the same program in java

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

    What if it is not a square matrix, how to approach mam

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

      You can create different matrix shape using list comprehension :)

  • @vijay-mw4gx
    @vijay-mw4gx 3 года назад +1

    Tysm

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

    Mam it showing error l
    " List assignment index out of range "

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

      Please check the range in the for loop :)
      If possible give me the program i will check for you :)

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

    how can we do this for nxm matrix

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

      You can take input like this:
      n = int(input("rows:"))
      m = int(input("cols:"))
      ar = [[0 for j in range(n)] for i in range(m)]
      for i in range(m):
      for j in range(n):
      print(ar[i][j],end=" ")
      print()
      :)

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

    Hello.. thanks for this wonderful video. Can you help me acquire the below pattern??
    For N = 3
    33333
    32223
    32123
    32223
    33333

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

    hai this code convert in java

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

    Please give code in the description

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

    print without array

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

    output
    m=1
    n=20
    20 19 18 17 16
    15 14 13 12 11
    10 9 8 7 6
    5 4 3 2 1
    use 1 while loop

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

    I can't do that it only shows 0 at 1st place and 0 at rest all

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

    it doesn't run in mine

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

    i code exactly like you, and somehow it did not print all the latin square :))

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

      Give me the program i will check :)

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

      @@AmulsAcademy a=int(input())
      ar =[[0 for x in range(a)]for y in range(a)]
      n=1
      low=0
      high=n-1
      count=int((a+1)/2)
      for i in range(count):
      for j in range(low,high+1):
      ar[i][j]=n
      n=n+1
      for j in range(low+1,high+1):
      ar[j][high]=n
      n=n+1
      for j in range(high-1,low-1,-1):
      ar[high][j]=n
      n=n+1
      for j in range(high-1,low,-1):
      ar[j][low]=n
      n=n+1
      low=low+1
      high=high-1
      for i in range(a):
      for j in range(a):
      print(ar[i][j],end="\t")
      print()

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

    Can I have program for
    1 2 3 4
    9 10 11 12
    13 14 15 16
    5 6 7 8

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

      matrix = [[" " for x in range(4)] for y in range(4)]
      n=1
      low=0
      high=3
      while low

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

    Mam please open a whatsApp group so that we can direct communicate with you

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

    how can write 16 2 3 13
    5 11 10 8
    9 7 6 12
    4 14 15 1

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

      num = int(input("enter the number of rows:"))
      n = 1
      matrix = [[0 for x in range(num)] for y in range(num)]
      for i in range(num):
      for j in range(num):
      matrix[i][j]=n
      n=n+1
      i=0
      j = num
      while i

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

      @@AmulsAcademy u r too good. and thank u so much

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

    1 2 3 4 17 18 19 20
    5 6 7 14 15 16
    8 9 12 13
    10 11 please explain to print this pattern

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

    H ki

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

    Who are waiting to know calendar program in python by amuls.

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

      num = int(input('enter number you rows want : '))
      #input 6 here.
      nList = [[0 for x in range(num)] for y in range(num)]
      n=1
      low = 0
      high = num-1
      count = int((num+5)/2)
      for i in range(count):
      for j in range (low, high+1):
      nList[i][j] = n
      n=n+1
      ## for j in range(low+1, high+1):
      ## nList[j][high] = n
      ## n = n+1
      ## for j in range(high-1, low-1, -1):
      ## nList[high][j] = n
      ## n=n+1
      ## for j in range(high-1, low, -1):
      ## nList[j][low] = n
      ## n = n+1
      ## low = low+1
      ## high= high -1
      for i in range(num):
      for j in range(num):
      print(nList[i][j], end ='\t')
      print()
      :)

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

    Chel MAA chodla

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

    1
    23
    456
    23
    1

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

    Can you do the same pattern but shape is different and you can’t use array and strings
    10 2 3 4
    9 1 5
    8 6
    7