Computer Science
Write a program using nested loops to produce a rectangle of *'s with 6 rows and 20 *'s per row.
Python
Python Control Flow
25 Likes
Answer
for i in range(6) :
for j in range(20) :
print('*', end = '')
print()
Output
********************
********************
********************
********************
********************
********************
Answered By
13 Likes
Related Questions
Write programs using nested loops to produce the following patterns:
0
2 2
4 4 4
6 6 6 6
8 8 8 8 8Write programs using nested loops to produce the following patterns:
2
4 4
6 6 6
8 8 8 8Write a Python script to input temperature. Then ask them what units, Celsius or Fahrenheit, the temperature is in. Your program should convert the temperature to the other unit. The conversions are:
F = 9/5C + 32 and C = 5/9 (F 32).
Given three numbers A, B and C, write a program to write their values in an ascending order. For example, if A = 12, B = 10, and C = 15, your program should print out:
Smallest number = 10
Next higher number = 12
Highest number = 15