Python Special Programs - Full Pyramid of Stars

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

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

  • @neomotivation9987
    @neomotivation9987 19 дней назад

    Code for this question:
    rows = int(input("Enter number of rows: "))
    for i in range(1, rows+1):
    for space in range(1, (rows-i)+1):
    print(" ", end = "")
    for star in range(1, i + 1):
    print("* ", end = "")
    print()

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

    Excellence teaching style with excellence representation love you sir and neso academy for providing such great lectures in free of cost no one in RUclips showed such great representation except neso academy ❤❤❤❤❤❤

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

    rows = int(input("enter num of rows :"))
    for i in range(1,rows+1):
    for space in range(1,rows-i+1):
    print(" ",end=" ")
    for j in range(1,i+1):
    print("*",end=" ")
    print()
    for k in range(1,rows):
    for l in range(1,k+1):
    print(" ",end=" ")
    for m in range(rows-k,0,-1):
    print("*",end=" ")
    print()

  • @UsmanAliAli-od7eg
    @UsmanAliAli-od7eg Год назад +2

    Thanks you dear jaspreet sing sir from Pakistan ❤❤🇵🇰🇵🇰long live for jaspreet sing sir from

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

    Keep the good work going sir ❤

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

    Good day, Thank you so much for the teaching. However on this question, the given code will result in a right angled triangle with the right angle at the bottom right side. It is not giving those white spaces between the stars. Kindly check on that please. Thank you once again

  • @HMOsman-ml9qp
    @HMOsman-ml9qp Год назад

    Please keep it going....

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

    def star_pyramid(base=5, reverse=False):
    """
    """
    for row in range(1, base+1, 1) if not reverse else range(base, 0, -1):
    print(f"{' ' * (base - row)}{'* ' * (row - 1) + '*'}")

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

      def star_pyramid(base=5, reverse=False):
      rows = [f"{' ' * (base - row)}{'* ' * (row - 1) + '*'}
      "
      for row in (range(1, base+1, 1) if not reverse else range(base, 0, -1))]
      print(rows)

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

    Thank's sir

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

    super

  • @Thekingslayer-ig5se
    @Thekingslayer-ig5se Год назад

    Much useful one

  • @justvibe-un8db
    @justvibe-un8db Год назад +1

    sir i tried this but for me it's not including space, it runs without leaving space . i had checked the code for multiple times.

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

      me too

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

      i just got it. Put a space between the quotation marks in the "end". Example print (end= ' ')

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

    Sir can you upload html and css Playlist please 🙏

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

    They written code was not running