149k views
3 votes
Step 1 (3 pts). Input the arrow base height (int) and width (int). Draw a rectangle using asterisks (height x width). Hint: use a nested loop in which the inner loop draws one row of *s, and the outer loop iterates a number of times equal to the height. Submit for grading to confirm two tests pass. Ex: if input is:-. 6-. 4

User Eugenia
by
7.8k points

2 Answers

3 votes
The answer is in the comments
User Greenoldman
by
8.4k points
6 votes

Answer:

height = int(input("Enter the arrow base height: "))

width = int(input("Enter the arrow base width: "))

# Draw rectangle

for i in range(height):

for j in range(width):

print('*', end='')

print()

Output:

For the input 6 and 4, the output would be:

****

****

****

****

****

****

User Ctusch
by
7.6k points