About 2,150,000 results
Open links in new tab
  1. Program to print a rectangle pattern - GeeksforGeeks

    Feb 24, 2023 · Given height h and width w, print a rectangular pattern as shown in the example below. Examples: Output : @@@@@ @ @ @@@@@ Input : h = 7, w = 9. Output : …

  2. Python Nested Loops To Print Rectangle With Asterisks

    num_rows = 2 num_cols = 3 for i in range(num_rows): print('*', end=' ') for j in range(num_cols-1): i*=j print('*', end=' ') print('')

  3. Python Program to Print Rectangular Pattern - Codesansar

    This python program generates or prints rectangular pattern made up of stars up to n lines.

  4. Python Programs to Print PatternsPrint Number, Pyramid, Star ...

    Sep 3, 2024 · In this lesson, you’ll learn how to print patterns using the for loop, while loop, and the range() function. This article teaches you how to print the following patterns in Python.

  5. Python Program to Print Rectangle Number Pattern - Tutorial …

    This article shows how to write a Python Program to Print a Rectangle Number Pattern using a for loop, while loop, and functions. This example uses the for loop to iterate rows and columns …

  6. Using nested Loops to print a Rectangle in Python | bobbyhadz

    Apr 11, 2024 · To use nested loops to print a rectangle: Use a for loop to iterate over a range object of length N rows. Use a nested for loop to iterate over a range object of length N …

  7. How to print rectangle / square pattern in python - Funda of …

    Write a program to print dynamic rectangle pattern in python. height = int ( input ( "Enter the height of the rectangle: " )) width = int ( input ( "Enter the width of the rectangle: " ))

  8. How to print a rectangle pattern using numbers in python

    Sep 27, 2022 · width = int(input("Enter the width of the rectangle:")) height = int(input("Enter the height of the rectangle:")) for x in range(0, width, 1): for y in range(0, height, 1): print(y, end = ' …

  9. Python Programs to Print PatternPrint Number, Pyramid, Star ...

    Feb 11, 2025 · Square and rectangle patterns How to print patterns in Python? Mostly all the patterns include nested loop, where the outer loop defines the number of rows, and the inner …

  10. Print Rectangle Pattern in C / C++ / Java / Python / C#

    #***** # alphabetacoder.com #Python program for a rectangle pattern #***** # take input l = int(input("Enter the length: ")) w = int(input("Enter the width: ")) # new line print ("") # display …

  11. Some results have been removed
Refresh