Sample problem for beginner | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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.

3rd Apr 2022, 4:44 PM
Luke Cushman
2 Respostas
+ 2
try x = input() y = int(input()) print(x*y) https://code.sololearn.com/cCTJYOLeCr97/?ref=app
3rd Apr 2022, 4:45 PM
Infinity
Infinity - avatar
0
Got it. Thanks. Was thinking to deep into that.
3rd Apr 2022, 4:51 PM
Luke Cushman