Program 4
Write a program that asks the user for their name and how many times to print it. The program should print out the user’s name the specified number of times.
Program:
name=input("Enter the Name:")
n=int(input("Enter how many Times you want to print:"))
for i in range(0,n):
print(name)
Output:
Enter the Name:satya
Enter how many Times you want to print:5
satya
satya
satya
satya
satya
No comments:
Post a Comment