Python Pattern Programs - Printing Stars '*' in D Shape

Published: 12 May 2017
on channel: Amulya's Academy
34,040
374

In this Python Pattern Printing Programs video tutorial you will learn to print star '*' in D shape in detail.

To print star Pattern in D 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 columns.Then we are using if else conditional statements that is because we are not printing stars in each row and each column we need stars in particular pattern for that we need conditions.here we are using logical and logical or operators.

If you are using Python 2 then if you write this code you will get error because in python 2 print is not a function and also we cant use end there so you need to use print as statement and instead of end you need to use coma (,) at the end of print statement to get the same output.

in python 3 you write print like this:
print("*',end="")

in python 2 you need to write:
print "*",

For more free tutorials on computer programming
  / amulsacademy  
  / amulsacademy  


On this page of the site you can watch the video online Python Pattern Programs - Printing Stars '*' in D Shape with a duration of hours minute second in good quality, which was uploaded by the user Amulya's Academy 12 May 2017, share the link with friends and acquaintances, this video has already been watched 34,040 times on youtube and it was liked by 374 viewers. Enjoy your viewing!