Printing Stars "*" in Pyramid Shape | Triangle | Python Pattern Program

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

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

  • @user-oc8fu6zx3m
    @user-oc8fu6zx3m 15 дней назад +2

    Here is the updated version :
    n=int(input("Enter the number of rows:"))
    for i in range(1, n + 1):
    print(" " * (n - i), end=" ")
    print("*" * (2 * i - 1))
    Make it more simple........

  • @rashichaudhry5954
    @rashichaudhry5954 9 месяцев назад +6

    very well explained! saw so many videos but this was the easiest to understand :)

  • @twister1182
    @twister1182 Месяц назад +1

    Explained in a very simple way. Thanks👍

  • @beckypang5251
    @beckypang5251 2 года назад +7

    excellent explanation, not only for this questions but also help me to do other printing star pattern questions

  • @Hi_kartik
    @Hi_kartik Год назад +3

    n = 5
    i = 1
    while i

  • @shravanacharya5987
    @shravanacharya5987 7 месяцев назад +1

    Wah bete mauj kardi.

  • @chandrasekars8904
    @chandrasekars8904 2 месяца назад +1

    This is really an excellent channel on Python like "techie talkee"

  • @shashankrai6349
    @shashankrai6349 2 года назад +8

    loved it ! thank u for teaching us !

  • @talhadawar8317
    @talhadawar8317 4 месяца назад

    Thnks mam what a wonderful and simple explanation ❤

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

    Wow th way of explaining pyramid star very nice

  • @KishoreKumarV-ky6sh
    @KishoreKumarV-ky6sh 3 месяца назад +1

    Excellent explanation of logic the best channel for learning about patterns

  • @VenkatasaiEppakayala
    @VenkatasaiEppakayala 5 месяцев назад

    This is the short code that I have never seen in another videos and websites

  • @adithyankbabu2209
    @adithyankbabu2209 27 дней назад +1

    Thanks for everything mam😌😌👌

  • @ds268393
    @ds268393 7 месяцев назад

    Great explanation with a beautiful voice.Thanks

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

    Simple explanation

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

    Very helpful tutorial

  • @user-et7jy7bu3j
    @user-et7jy7bu3j 10 месяцев назад

    Ty bro, was about to give up ❤

  • @sekharbabusaripalli181
    @sekharbabusaripalli181 Год назад +1

    Very Good explanation sister 😊

  • @fuhua2362
    @fuhua2362 Год назад +1

    this was more good than our teacher

  • @user-nz8bu5vl2l
    @user-nz8bu5vl2l 8 дней назад +1

    is it compulsory to take j can we use other alphabets

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

    Thank you mam.. This is the best video i got ❤

  • @parmarfamily6311
    @parmarfamily6311 Год назад +2

    Usefull

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

    thanks a lot

  • @LearnComputerWithAwais
    @LearnComputerWithAwais Год назад +1

    Awesome Video and Good Explanation

  • @De.Raizel
    @De.Raizel Год назад +2

    Thanks

  • @1karachii
    @1karachii 11 месяцев назад

    Amazingly Explained thanks

  • @dineshreddynarsing4788
    @dineshreddynarsing4788 Год назад +1

    Nice explanation

  • @tanushreegharami227
    @tanushreegharami227 Год назад +1

    You got one more subscriber 😊 Thanks very helpful

  • @prettypretty05
    @prettypretty05 8 месяцев назад

    You are the best ❤

  • @umeshsingh-nx1zq
    @umeshsingh-nx1zq Год назад +1

    what an awesome explanation

  • @akashdeep_x464
    @akashdeep_x464 Год назад +1

    Wow

  • @dhanashrichitukane1121
    @dhanashrichitukane1121 2 месяца назад +1

    Thanks ❤ dear

  • @MuhammadAshrafAshraf-mb1qi
    @MuhammadAshrafAshraf-mb1qi 9 месяцев назад

    Thank you!

  • @nireekshangoddugorla7921
    @nireekshangoddugorla7921 2 года назад +1

    good explanation madam

  • @dyotakgiri79
    @dyotakgiri79 Год назад +1

    What a nice explanation!!!

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

    thankyou all doubt clear

  • @sreedharlikit8966
    @sreedharlikit8966 2 года назад +1

    Hats off super mam

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

    your voice is very nice

  • @GuitaristAlok
    @GuitaristAlok Год назад +1

    like your videos and voice tooo👍❣

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

    apka dhanyawaad

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

    Thank you.

  • @rsnda974
    @rsnda974 4 месяца назад

    Excellent I understood please help in fubunocci

  • @holy-crusader6139
    @holy-crusader6139 8 месяцев назад

    bro thanks very good video

  • @Vaibhavi_Nayak
    @Vaibhavi_Nayak Год назад +1

    Loved your explanation..

  • @amariealfaro1365
    @amariealfaro1365 Год назад +1

    Hello newbie here maam. it show the full pyramid and the right.. what about the left? Thank u

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

      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

  • @palakgrover9925
    @palakgrover9925 Год назад +1

    Which platform is she using here?

  • @185PerCentJuice
    @185PerCentJuice 3 года назад +2

    Is it possible to print an isosceles triangle?

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

    Thnx mam

  • @medarametlapraveen
    @medarametlapraveen Год назад +5

    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

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

      it prints 1 layer less

    • @MaahirCodes
      @MaahirCodes Год назад +1

      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)

    • @trueAKspeaks
      @trueAKspeaks 11 месяцев назад +1

      Atleast you tried and most importantly, it works. Just one row lesser.

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

    Good explanation 😁

  • @vamshithota4919
    @vamshithota4919 2 года назад +1

    U voice is like amulya academy only

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

      This is Amulya academy second RUclips channel only

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

      why do indians say 'only' after every sentence

  • @lm2thed142
    @lm2thed142 6 месяцев назад

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

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

    👍👍👍👍

  • @mashapoguajay3322
    @mashapoguajay3322 Год назад +1

    Thanks madam 😊

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

    Can we do it without input command?

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

      It is possible but then yuuou can only get the pyramid for aa fixed value, ie cannot be inputed by the user

  • @bdof6528
    @bdof6528 3 года назад +26

    U voice match with amulya academy girl?

    • @programsandme7593
      @programsandme7593  3 года назад +40

      Yeah.. because this is my another channel 😊

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

      @@programsandme7593 congrats ❤️🎉
      U are too good in programing 🔥

    • @viratstatus1019
      @viratstatus1019 Год назад +2

      @@programsandme7593 😂

    • @hi.996
      @hi.996 Год назад

      ​@@bdof6528 🗿

    • @05c4_sharmila5
      @05c4_sharmila5 Год назад

      😂😂😂

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

    Please explain hollow pymarid

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

      # 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

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

    i have an doubt

  • @VinothKumar-ej4nn
    @VinothKumar-ej4nn 2 года назад +2

    Not proper o/p ...
    It's coming EOFerror:

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

    Ur amulya academi right

  • @aperson6405
    @aperson6405 5 месяцев назад

    goat

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

    Hi Amulya ji

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

    ur voice ❤️❤️❤️❤️❤️❤️

  • @Sachin-yo3jw
    @Sachin-yo3jw 11 месяцев назад +1

    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)

  • @VinayKumar-ek5el
    @VinayKumar-ek5el Год назад

    Mera issi code se kuch or hi print kr rhaa h

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

    South Indian

  • @vaidikayadav294
    @vaidikayadav294 5 месяцев назад

    Bro its an not yan

  • @priyanshudutta3229
    @priyanshudutta3229 3 месяца назад

    yennnnnnnnnnnnnnnnnnnnnn

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

    Jab koi jyada English bolta hai
    To mera dil karta hai...
    English me video bana rahe ho
    Or mujhe kuch ghanta samajh nahi aara

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

    n is pronounced as yen XD

  • @praneethd9436
    @praneethd9436 5 месяцев назад

    Good explanation

  • @ylmazoncu5693
    @ylmazoncu5693 11 месяцев назад

    Thank you!

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

    Great