0
Can you help on Working with input?
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 Remember to convert the input to the required data type. Here is my attempt: x = 5 y = input() print(x * y) (x * y) Ps:when i run the code there were test cases 1 to 4 both 3 and 4 were hidden but 1 and 2 were not
7 ответов
+ 6
You are taking input for string but not for repeated times.
Take input to 'x' also..
edit: also convert second input to int type as int(input()) Shah Johan
+ 6
Shah Johan
Well done!
You might like to let Jayakrishna🇮🇳 know that you have solved the problem.
Was he able to help you?
+ 3
Test cases #1 and #2 keeps ticking whenever i change x = 5 to x = 2(#1) x = 8(#2)
+ 2
No. You have to take input number , not your manual input.. Shah Johan
y = int( input() )
first input is string
second input is a number
+ 2
Shah Johan
string_input = input()
integer_input = int(input())
Now you need to print the output of
string_input * integer_input
Read through Jayakrishna🇮🇳 answers again and see if you can fix your code
+ 2
Rik Wittkopp
I already fix my code thanks btw
+ 1
Same problem here, how did you solve that? Shah Johan