Printing Stars '*' in D Shape in python || Alphabet Pattern in python || Print alphabet in python ||

Опубликовано: 31 Октябрь 2024
на канале: CodeWithShivam
207
3

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 to print stars in particular row or column for that we need conditions. Here we are using logical and And logical or operators.

Source code:

for i in range(6):
for j in range(6):
if (i==0 or i==5) and j!=5 or (j==0 or j==5) and (i!=0 or i!=5):
print("*",end=" ")
else:
print(end=" ")
print()


=============Alphabets in star shape link ==========

How to print A in star shape :    • Alphabet Pattern in python || Printin...  

How to print B in star shape :   • Alphabet Pattern in python || Print a...  

How to print C in star shape :   • Printing Stars '*' in C Shape in pyth...  

=============Python GUI programs =============
My first program in python :   • my first program in python. || how to...  

Python random number game:    • Random Number Guessing Game In Python...  

Python GUI calculator :   • Simple Calculator in Tkinter Python |...  

Python Login system :   • How to create Login System in Python ...  

Print table of any input number software :   • How to Print Table in Python | how to...  

============Tag==============
Alphabet Pattern in python
How to print D
How to print D in star shape
Alphabets in python
Print alphabet in python
Printing stars in alphabet shape in python
Printing stars in alphabet shape
Python Pattern Program
Python Tutorial

#pythonprogrammingtutorial #python_pattern #alphabet_shape #pythontutorial