You will learn in detail how to print the star symbol (*) in the shape of a L in this Python Pattern Printing Programs video tutorial.
You need to use two for loops in Python to print a star pattern in a L 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 #pythonprogramming #pythontutorial #pythonprojects #Strybo #Curse
Song: Strybo - Curse [NCS Release] Music provided by NoCopyrightSounds Free Download/Stream: http://ncs.io/Curse Watch: http://youtu.be/
Thanks for watching!!
Subscribe Now For More Videos!!