Assignment
University
University of ReginaCourse
Computer Science (UR)Pages
1
Academic year
2023
priyankavaiya07
Views
0
p {margin: 0; padding: 0;} .ft00{font-size:23px;font-family:Calibri-Light;color:#000000;} .ft01{font-size:23px;font-family:Calibri-Light;color:#000000;} .ft02{font-size:16px;font-family:Calibri;color:#000000;} .ft03{font-size:23px;line-height:31px;font-family:Calibri-Light;color:#000000;} 16. Write a program that draws “modular rectangles” like the ones below. The user specifies the width and height of the rectangle, and the entries start at 0 and increase typewriter fashion from left to right and top to bottom, but are all done mod 10. Below are examples of a 3 × 5 rectangle and a 4 × 8. x=int(input("Enter the first parameter: ")) y=int(input("Enter the second parameter: ")) count=0 for i in range(x): for j in range(y): print(count%10 , end=" ") count = count+ 1 print("\n")
Creating Modular Rectangles with Specified Dimensions in Python
Please or to post comments