Python Pattern Programs | Inverse Triangle Pattern

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ต.ค. 2024

ความคิดเห็น • 14

  • @torpedoe1936
    @torpedoe1936 ปีที่แล้ว +2

    You sir, are a legend !!! Thank you so much.

  • @saxenafunwithfriends97
    @saxenafunwithfriends97 3 ปีที่แล้ว +1

    I promise I see your videos regularly

  • @hanaineu
    @hanaineu 2 ปีที่แล้ว

    Thank you for such a nic explanation! But I have a question (or questions) regarding the code.
    1. Which code telling that the pyramid starts from right side?
    2. I reckon some code some people write their code like this
    for i in range(n,0,-1):
    What is the -1? and not only in the outer loop but also in inner loop!

    • @sanazvakil8736
      @sanazvakil8736 ปีที่แล้ว

      Thank u more than all stars in the milkey way teacher🙏🙏🙏🌼🌼🌼🌼🌼🌼🌼🌼🌼🌼🌼💖💖💖💖💖💖💖

  • @jaiho6826
    @jaiho6826 ปีที่แล้ว +1

    THANK YOU SIR .......😇

  • @hemchandmovva4460
    @hemchandmovva4460 3 ปีที่แล้ว +2

    Thank you so much sir

  • @marekmolcan
    @marekmolcan 3 ปีที่แล้ว +9

    Hi, my solution is:
    stars = int(input('Enter the number of stars: '))
    for star in range(1,stars+1):
    print((stars-star) * ' ' + star * '*')

  • @Manojdeevi1997
    @Manojdeevi1997 3 ปีที่แล้ว +1

    sir how get space between two star

    • @hirosan6120
      @hirosan6120 11 หลายเดือนก่อน

      try this code
      def print_inverted_left_triangle(total_rows):
      for row in range(1, total_rows + 1):
      # display space
      for space in range(1, (total_rows - row) + 1 ):
      print(" ", end=" ")
      # display *
      for symbol in range(1, row + 1):
      print(" *", end="")
      print()
      total_rows = int(input("Enter the number of rows: "))
      print_inverted_left_triangle(total_rows)

  • @saxenafunwithfriends97
    @saxenafunwithfriends97 3 ปีที่แล้ว +1

    Please bhai can you speak in hindi