- 4

Write a program to take x and y as input and output the string x, repeated y times. Sample Input hi 3 Sample Output hih

What is the answer?

19th Aug 2021, 2:52 AM
Amala Yakin
23 odpowiedzi
+ 8
simply Write a program to take x and y as input and output the string x, repeated y times. x = str(input()) y = int(input()) print(x * y)
16th Nov 2021, 6:20 PM
Mante Joseph
+ 7
print(input() * int(input())) Output: hihihi
19th Aug 2021, 2:57 AM
jjnanthakumar
jjnanthakumar - avatar
+ 4
Did anyone run the code and it passed becaz i failed and im getting frustrated
22nd Jan 2022, 2:26 AM
Kelvin Lule
+ 1
Thx
19th Aug 2021, 3:25 AM
Amala Yakin
+ 1
it keep appearing only twice and i am sure i put in the right code
7th May 2022, 12:38 PM
DANIEL MYLES EKEMINI ABASI
+ 1
x=str(input()) y=int(input()) print(x*y)
23rd May 2022, 3:39 PM
Oleksandr Lavrenchuk
Oleksandr Lavrenchuk - avatar
+ 1
x=str(input(hi)) y=int(input(2)) print(x*y)
18th Dec 2022, 6:36 PM
Asnakew Tagele
Asnakew Tagele - avatar
0
x= input() y= int(input()) print(x * y)
10th Oct 2021, 2:04 PM
Frenny Cupones
0
I am not getting answer
13th Feb 2022, 2:46 AM
Anshpreets 6106
0
not getting answer at all.....trying so many time
13th Feb 2022, 8:05 PM
Vaishnavi jallewar_25
0
Thanks!
20th Feb 2022, 2:32 AM
Armando López Rodríguez
Armando López Rodríguez - avatar
0
x=input() y=input() print(str(x) * int(y))
27th Feb 2022, 1:21 PM
Bahar
0
x=str(input()) y=int(input()) print(x*y)
14th Mar 2022, 8:12 PM
UF.Rasna
UF.Rasna - avatar
0
x=input() y=int(input()) print(x*y)
29th Mar 2022, 1:37 PM
Abdelkhalek Nael Ahmad Allan
Abdelkhalek Nael Ahmad Allan - avatar
0
x=input() y=int(input()) print(x*y)
18th May 2022, 4:04 AM
PHUBEJ ASAWATANAWAT
0
ok this is a very confusing one and it took me a bit to understand. The input is whatever the question is providing not that you physically have to use "HI" as that is just a sample. When you are in the template it mentions what the expected output should be which is the word "cool" multiplied twice. Sadly they shouldnt have provided that sample as it is what derailed me from continuing for a week as i grew very frustrated. The answer to this is: x=input() y=2 print(x*y)
27th Jul 2022, 5:56 AM
Lanette Garcia
0
This is the Solution x=input('') y=int(input('')) print(x*y)
7th Sep 2022, 5:46 AM
Engr Amin
Engr Amin - avatar
0
To getting answer to me
21st Sep 2022, 3:02 PM
Sathiya Priya
Sathiya Priya - avatar
0
Ive tried all these possible solutions,,none of them working
21st Jan 2023, 10:46 AM
Ruan Folscher
Ruan Folscher - avatar
0
x=str(input()) y=int(input()) print(str(x) * y) good luck ^___^
5th Feb 2023, 10:00 PM
Fatemeh Jamali