In this Python Pattern Printing programs video tutorial you will learn to print stars in hollow diamond shape in detail.
To print stars in hollow diamond shape in python you have to use two for loops. the first loop is responsible for rows and the second for loop is responsible for column.next we need to use if else conditional statements. To write the conditions we used logical or operator.
If you are using python 2 then in the above program you have to use print as statement and you cant use end in python 2, so
print("*",end="")
instead of this you have to use
print "*",
For more free tutorials on computer programming
/ amulsacademy
/ amulsacademy