python4 --- print rectangle

1: Method 1 
for I in Range (. 6):
for J in Range (. 3):
Print ( "*", End = "")
Print ()

2: input display rectangle
weight = int(input("weight:"))
height = int(input("height:"))
num_height = 1
while num_height <= height:
num_width = 1
while num_width <= weight:
print("*", end="")
num_width += 1
print()
num_height +=1

Guess you like

Origin www.cnblogs.com/will--1213/p/11827240.html