- 3
Need help
Practice 15.2 is difficult
21 Answers
+ 3
Which of the Python courses?
Please explain the task and show your code.
+ 2
Do not cast x to int but leave it a string. Then x will be repeated y times. It can re-view the previous lessons and look at their example
+ 2
Re-read the previous lessons – there you will find an example on how to repeat a string. Weepy emoji don't contribute to solving it. ;)
+ 2
Could you show us example input and output as in the task description?
+ 2
Hey Qasim Shahzad
Cast x to input() only
Only and y to int(input())
+ 1
if you want to take the word first, then remove the "int" data-type of x to only input().
else do that for y
+ 1
@Qasim Shahzad, you wrote:
x = int(input())
change it to only: x =input()
only if you want to enter the string first.
else do it for y
edit]: Qasim Shahzad
give input like this in sololearn:
value for x (hit enter)
value for y (click submit)
+ 1
Well, then try what I suggested and DO NOT cast x to int().
Read the previous lessons and find an example how they repeat a string.
+ 1
This should work:
x=input()
y=input()
print(str(x)*int(y))
0
They ask me to write a code in which x can b written y times
0
Still confused
0
😭😭
0
It's still not working NEZ
0
Would you please generate a full code for me.
Still confused
0
Task says
Write a program to take x and y as input and output the string x, repeated y times.
0
I learn the previous examples as well but I'm stucked
0
Look it's still not working
0
I got it