154k views
1 vote
PYTHON

7.
Write a program to fill the screen horizontally and vertically with your name. (Hit add the
option end= into the print function to fill the screen horizontaly)​

1 Answer

5 votes

Answer:

The program in Python is as follows:

name = input("Name: ")

for i in range(50):

for j in range (20):

print(name,end =" ")

print()

Step-by-step explanation:

This gets input for name

name = input("Name: ")

This iterates through the number of rows (here, we use 50 rows)

for i in range(50):

This iterates through the number of columns (here, we use 20 columns)

for j in range (20):

This prints the name

print(name,end =" ")

This prints a new line

print()

User Franiis
by
4.2k points