- 3

Need help

Practice 15.2 is difficult

24th Feb 2022, 8:23 AM
Mary Rian
Mary Rian - avatar
21 Respostas
+ 3
Which of the Python courses? Please explain the task and show your code.
24th Feb 2022, 8:26 AM
Lisa
Lisa - avatar
+ 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
24th Feb 2022, 8:31 AM
Lisa
Lisa - avatar
+ 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. ;)
24th Feb 2022, 8:38 AM
Lisa
Lisa - avatar
+ 2
Could you show us example input and output as in the task description?
24th Feb 2022, 8:47 AM
Lisa
Lisa - avatar
+ 2
Hey Qasim Shahzad Cast x to input() only Only and y to int(input())
24th Feb 2022, 9:03 AM
NEZ
NEZ - avatar
+ 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
24th Feb 2022, 8:32 AM
NEZ
NEZ - avatar
+ 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)
24th Feb 2022, 8:37 AM
NEZ
NEZ - avatar
+ 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.
24th Feb 2022, 8:56 AM
Lisa
Lisa - avatar
+ 1
This should work: x=input() y=input() print(str(x)*int(y))
24th Feb 2022, 10:17 AM
Bubble Tea
Bubble Tea - avatar
24th Feb 2022, 8:29 AM
Mary Rian
Mary Rian - avatar
0
They ask me to write a code in which x can b written y times
24th Feb 2022, 8:30 AM
Mary Rian
Mary Rian - avatar
0
Still confused
24th Feb 2022, 8:35 AM
Mary Rian
Mary Rian - avatar
0
😭😭
24th Feb 2022, 8:35 AM
Mary Rian
Mary Rian - avatar
0
It's still not working NEZ
24th Feb 2022, 8:40 AM
Mary Rian
Mary Rian - avatar
0
Would you please generate a full code for me. Still confused
24th Feb 2022, 8:47 AM
Mary Rian
Mary Rian - avatar
0
Task says Write a program to take x and y as input and output the string x, repeated y times.
24th Feb 2022, 8:48 AM
Mary Rian
Mary Rian - avatar
0
I learn the previous examples as well but I'm stucked
24th Feb 2022, 8:59 AM
Mary Rian
Mary Rian - avatar
24th Feb 2022, 9:00 AM
Mary Rian
Mary Rian - avatar
0
Look it's still not working
24th Feb 2022, 9:00 AM
Mary Rian
Mary Rian - avatar
0
I got it
24th Feb 2022, 9:05 AM
Mary Rian
Mary Rian - avatar