+ 1

Test cases conflict (Python)

Hi! When doing the projects I run the terminal and I do the test case #1 correctly but, case #2 seems to be wrong, then I change the code so the #2 can be true and well, the #1 becomes wrong now. And that is not letting me unblock the rest of the cases, so, even if I know the answers (inputs and expected outputs) one is always wrong and the other is right. It happens in all projects. Am I missing something?

22nd Feb 2022, 9:44 AM
Mario Alberto González García
Mario Alberto González García - avatar
4 odpowiedzi
+ 2
Mario Garcia Don't put anything in the bracketz of the input() num1 = int(input()) num2 = int(input()) print(num1 + num2) This will prompt you for 2 user inputs which must be entered at the same time on Sololearn. They must also be entered on seperate lines EXAMPLE INPUT 6 3 OUTPUT 9
23rd Feb 2022, 7:38 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Mario Garcia It sounds like you are writing code to suit a specific input only, but you need to write code to suit user input. I suggest you review input() int(input()) float(input())
22nd Feb 2022, 10:01 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
That solved it! Now I can move on :) thanks
23rd Feb 2022, 8:17 AM
Mario Alberto González García
Mario Alberto González García - avatar
0
I'm still getting errors after driving my variables to the user int1 = int(input(6)) int2 = int(input(3)) print (int1 + int2 ) int3 = int(input(11)) int4 = int(input(22)) print = (int3 + int4) And keep getting errors EOL in line
22nd Feb 2022, 10:57 PM
Mario Alberto González García
Mario Alberto González García - avatar