+ 1
Sample problem for beginner
Hey there, I’m just starting out and came across this sample problem. Write a program to take x and y as input and output the string x, repeated y times. Sample Input hi 3 Sample Output hihihi I tried the solution of: x = input (‘Hi’) y = int(input(3)) print (x * y) And this does not work. Thanks ahead for any insight.
2 Respuestas
+ 2
try
x = input()
y = int(input())
print(x*y)
https://code.sololearn.com/cCTJYOLeCr97/?ref=app
0
Got it. Thanks. Was thinking to deep into that.