Needs to be in Python Printing a box of characters Your task here is to write a
ID: 3854578 • Letter: N
Question
Needs to be in Python
Printing a box of characters
Your task here is to write a program in Python to will prompt user to enter an integer between 10 and 3 inclusive and also a character. Then use these two values to display a box using the character entered with size of box determined by the number entered.
Here is a sample output:
Enter size of box: 4
Enter a character: %
%%%%
%%%%
%%%%
%%%%
Here is another possible output:
Enter size of box: 3
Enter a character: &
&&&
&&&
&&&
Your program will run only once but you must used repetition construct to draw the box using values entered.
Explanation / Answer
while True:
n=int(input("Enter size of box: "))
x=input("Enter a character: ")
print(n)
for i in range(0,n):
print(n*x)
while data u enter it will repetatdly ask you to entr size and symbol. take input for size and symbol in n and x respl. then usinf for loop print in range given as square
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.