Python Pattern Programs - Printing Stars '*' in I Shape | borne - Out Of Here

Опубликовано: 25 Май 2026
на канале: Sid Tech
7
2

You will learn in detail how to print the star symbol (*) in the I shape in this Python Pattern Printing Programs video tutorial.

You need to use two for loops in Python to print a star pattern in an I shape. The first for loop is in charge of the rows, while the second for loop is in charge of the columns. The reason we are using if else conditional statements is because we need to print stars in a specific pattern rather than in every row and column, which requires conditions. Here, logical and logical or operators are being used.


If you try to write this code in Python 2 you will receive an error since end cannot be used there and print is not a function in Python 2. To get the same result you must use print as a statement and a comma (,) at the end of the print statement.

In Python 3, you would type print as follows:
print("*',end="")

Python 2 requires that you type print "*",

#python #pythonforbeginners #pythontutorial #pythonprogramming #pythonprojects #borne #OutOfHere

Song: borne - Out Of Here [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://NCS.io/OutOfHere
Watch: http://youtu.be/

Thanks for watching!!

Subscribe Now For More Videos!!