+ 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?
4 Réponses
+ 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
+ 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())
+ 1
That solved it! Now I can move on :) thanks
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