Write a python program to fill the screen horizontally and vertically with your name. [Hint: add the
option end=” into the print function to fill the screen horizontally.]
Answers
Answered by
7
Program:
name = input("Enter your name : ")
while 1:
print(name, end = " ")
More program:
1) Write a program that outputs 20 lines, numbered 1 to 20, each with your name on it.
Program:
name = input("Enter your name : ")
for i in range (1, 21):
print(i, name)
2) Write a program that prints a list of the integers from 1 to 20 with their squares.
Program:
print("Squares of integers are : ")
for i in range (1, 21):
print(i,"->",i*i)
3) Write a program to print the series 100, 98, 96, . . . , 4, 2.
Program:
for i in range (100, 1, -2):
print(i, end = " ")
Similar questions