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
8 Respuestas
+ 1
I can't understand
Would u plz write for me the code if u don't mind ?
+ 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?
0
Display name prompt (print)
Read name response (input)
Display count prompt
Read count response
For count times (for, while)
Display name
0
Yes u r right
Actually I have an exam in a week so that's why am trying some exercises
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
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)
0
Thanks alot for kind help
0
Here you go:
name = input(“Enter your name: “)
multipliedBy = input(“Enter the amount of times: “)
result = name * multipliedBy
print(result)