+ 4

Python lesson 14.1 help

I passed test case #1, but then when I do test case #2, it tells me I failed because test case #1 is wrong. How do I fix? x = input() y = input() Task: Given the code above, output the input x repeated y times. For the first test case it says the expected output is hihihihihi so I did print(ā€œhiā€ * 5) and that worked. Then the second test it says expected output is pythonpython but when I change my code to print(ā€œpythonā€ * 2) it says I failed because the expected output is hihihihihi. How do I pass both?

22nd Apr 2022, 12:36 AM
Caroline
6 Answers
+ 4
x = input () y = int(input()) print(x * y)
22nd Apr 2022, 1:25 AM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 8
print(input()*int(input())
23rd Apr 2022, 9:51 PM
Oksana Evdokimova
Oksana Evdokimova - avatar
+ 6
Please copy and paste the lesson's problem explination. And also include your attempt so we can see where you messed up
22nd Apr 2022, 1:03 AM
Slick
Slick - avatar
+ 4
The lessons leading up to a challenge teach what you need to know. If you get stuck go back over the lessons that lead up to the challenge. The point of the challenge is to see if you grasped what was taught, so if you don't, then go back over them until you do.
22nd Apr 2022, 2:14 AM
Paul K Sadler
Paul K Sadler - avatar
+ 4
thanks for all your help everyone! I was filling in values for the input where I should have been leaving it blank
22nd Apr 2022, 2:22 AM
Caroline
+ 3
X = Int(input("enter the number:")) Y = Int(input("enter the number:")) Print(X * Y)
23rd Apr 2022, 12:23 PM
udesh sandakelum