0
I need help 15.2 python for beginners "Convert The Input"
I can't pass Python for Beginners Practice 15.2 "Convert The Input". I need if can anybody write the code answer to Pass all test cases. Thanks 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. I just pass test case 1 or 4 ,however 2,3 test cases lock.
6 Answers
+ 2
Apparently you can multiply a string directly in python, but I'd probably use a loop for practice, whichever you choose is up to you:
print(input() * int(input()))
or
str = input()
result = ""
for x in range(int(input())):
result += str
print(result)
+ 2
Nick,
I'll volunteer to be the first one you'd label a "hater".
As you had mentioned "huge amount of hate exists anyway" ...
Jev,
I would help if you would also take notice of the recommendation on how we post in this forum ...
https://www.sololearn.com/Discuss/333866/?ref=app
Also, please tag the thread properly to support searchability, and help the community reduce duplicate questions.
* (Tags had been updated)
https://code.sololearn.com/W3uiji9X28C1/?ref=app
+ 2
Ipang
You've been a big help to the community (I've seen it with my own eyes), but I wouldn't call you a hater because your attitude is quite the opposite of the ones I would call a hater, sorry if my words offended you but those âhatersâ wouldn't stop giving me based opinions that are uncalled for, please don't take offense and keep the community positive and alive đ
+ 2
Nick,
In respect to my friends who are now inactive, I will try my best ...
0
Thank you Nick and Ipang it helps me a lot , and in future I will do better I'm newbie here.
- 1
Hah, my answers are deleted