Python Program to Print Downward Triangle Mirrored Numbers Pattern

Write a Python program to print downward triangle mirrored numbers pattern using for loop. rows = int(input(“Enter Downward Triangle Mirrored Numbers Rows = “)) print(“====Downward Triangle of Mirrored Numbers Pattern====”) for i in range(1, rows + 1): for j in range(i, rows + 1): print(j, end = ‘ ‘) for k in range(rows – 1, … Read more

Python Program to Print Downward Triangle Mirrored Alphabets Pattern

Write a Python program to print downward triangle mirrored alphabets pattern using for loop. rows = int(input(“Enter Downward Triangle Mirrored Alphabets Rows = “)) print(“====Downward Triangle of Mirrored Alphabets Pattern====”) alphabet = 65 for i in range(rows): for j in range(i, rows): print(‘%c’ %(alphabet + j), end = ‘ ‘) for k in range(rows – … Read more

Python Program to Print Downward Triangle Alphabets Pattern

Write a Python program to print downward triangle alphabets pattern using for loop. rows = int(input(“Enter Downward Triangle Alphabets Pat Rows = “)) print(“====Downward Triangle Alphabets Pattern====”) alphabet = 65 for i in range(rows, 0, -1): for j in range(0, i): print(‘%c’ %(alphabet + j), end = ‘ ‘) print() This Python example prints the … Read more

Python Program to find all divisors of an integer

Write a Python program to find all divisors of an integer or number using for loop. In this Python example, the for loop iterate from 1 to a given number and check whether each number is perfectly divisible by number. If True, print that number as the divisor. num = int(input(“Please enter any integer to … Read more

Python Program to Print V Star Pattern

Write a Python program to print V star pattern using for loop. rows = int(input(“Enter V Star Pattern Rows = “)) print(“====The V Star Pattern====”) for i in range(1, rows + 1): for j in range(1, i + 1): print(‘*’, end = ”) for k in range(1, 2 * (rows – i) + 1): print(end … Read more

Python Program to Print Diamond Alphabets Pattern

Write a Python program to print diamond alphabets pattern using for loop. rows = int(input(“Enter Diamond Alphabets Pattern Rows = “)) print(“====Diamond Alphabets Pattern====”) alphabet = 64 for i in range(1, rows + 1): for j in range(1, rows – i + 1): print(end = ‘ ‘) for k in range(1, (2 * i)): print(‘%c’ … Read more

Python Program to Get Current Date and Time

Write a Python program to get the current date and time with an example. For example, in this programming language, we have a datetime module to work with or print the current date and time, and it will display the output. from datetime import date today = date.today() print(“Current Date = “, today) Python Program … Read more

Python Program to Print W Star Pattern

Write a Python program to print W star pattern using for loop. In this Python code, the printStars function iterate and displays the stars, and the printSpaces prints the spaces to print the W shape. def printStars(rows): for i in range(rows): print(‘*’, end = ”) def printSpaces(rows): for i in range(rows): print(end = ‘ ‘) … Read more

Python Program to Print Christmas Tree Star Pattern

Write a Python program to print Christmas tree star pattern using for loop. width = int(input(“Enter Chirstmas Tree Width = “)) height = int(input(“Enter Chirstmas Tree Height = “)) space = width * height n = 1 print(“====The Chirstmas Tree Star Pattern====”) alphabet = 65 for x in range(1, height + 1): for i in … Read more

Python Program to Print 8 Star Pattern

Write a Python program to print 8 star pattern using for loop. rows = int(input(“Enter 8 Star Pattern Rows = “)) print(“====The 8 Star Pattern====”) for i in range(1, rows * 2): if i == 1 or i == rows or i == rows * 2 – 1: for j in range(1, rows + 1): … Read more