0

Can anyone help me with this solution

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

22nd Apr 2022, 8:22 PM
Kushal Sharma
Kushal Sharma - avatar
8 odpowiedzi
+ 1
I can't understand Would u plz write for me the code if u don't mind ?
22nd Apr 2022, 8:27 PM
Kushal Sharma
Kushal Sharma - avatar
+ 1
Lose the capital letters. For statement will toss existing value of num and replace it with each letter in the user string. Instead, you want to loop num times so: for i in range(num) You do not want to print the letter plus one or even the time to loop plus one. What do you want to print?
22nd Apr 2022, 9:30 PM
John Wells
John Wells - avatar
0
Display name prompt (print) Read name response (input) Display count prompt Read count response For count times (for, while) Display name
22nd Apr 2022, 8:25 PM
John Wells
John Wells - avatar
0
Yes u r right Actually I have an exam in a week so that's why am trying some exercises
22nd Apr 2022, 8:44 PM
Kushal Sharma
Kushal Sharma - avatar
0
User = input("enter your name: ") Num=input("enter the number of times to print the name: ") For num in user : Print(num+1) #plz correct me
22nd Apr 2022, 8:50 PM
Kushal Sharma
Kushal Sharma - avatar
0
name=input("enter the name") S=int(input("enter how many time u want to repeat the name")) For i in range(s): Print(name)
23rd Apr 2022, 4:37 PM
Vudayana Sandhya Rani
0
Thanks alot for kind help
23rd Apr 2022, 5:10 PM
Kushal Sharma
Kushal Sharma - avatar
0
Here you go: name = input(“Enter your name: “) multipliedBy = input(“Enter the amount of times: “) result = name * multipliedBy print(result)
24th Apr 2022, 5:59 PM
Thomas Walker