Python Pattern Programs | Inverse Triangle Pattern
HTML-код
- Опубликовано: 14 окт 2024
- In this Tutorial we have explained Python Program to Print Inverse Right Angle Triangle Star, Number Pattern in detail.
You will learn the Programming Logic behind the creation of this Pattern and also the step by step process of writing the source code using Python Language.
our Social Media Pages
/ exampleprogram
/ exampleprogram
/ example_program
Our Website
www.ExamplePro...
#ExampleProgram
You sir, are a legend !!! Thank you so much.
You're welcome!
I promise I see your videos regularly
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!
Thank u more than all stars in the milkey way teacher🙏🙏🙏🌼🌼🌼🌼🌼🌼🌼🌼🌼🌼🌼💖💖💖💖💖💖💖
Thank you so much sir
Pleasure :)
THANK YOU SIR .......😇
You're welcome!
sir how get space between two star
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)
Hi, my solution is:
stars = int(input('Enter the number of stars: '))
for star in range(1,stars+1):
print((stars-star) * ' ' + star * '*')
insanity 🤯
Please bhai can you speak in hindi