What is wrong? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
11th Nov 2020, 5:44 AM
Julio Carrillo
6 Answers
+ 3
The lines that implement the quadratic formula need correction. Change from this: f = (-B + sqrt((B**2) - (4 * A * B))/(2*A)) g = (-B - sqrt((B**2) - (4 * A * B))/(2*A)) To this: f = (-B + sqrt((B**2) - (4 * A * C)))/(2*A) g = (-B - sqrt((B**2) - (4 * A * C)))/(2*A) [Replace B with C. Move one of the closing parentheses.]
11th Nov 2020, 6:17 AM
Brian
Brian - avatar
+ 2
When SoloLearn prompts you for program input enter the three numbers on separate lines by pressing the enter key after each number. Like this: 1 4 4 Then press the Submit button.
11th Nov 2020, 6:38 AM
Brian
Brian - avatar
0
No, it's the same mistake. I think it is a sololearn app mistake because I've tried another code, more simple, and it is the same mistake. It is when I use int(input())
11th Nov 2020, 6:23 AM
Julio Carrillo
0
Julio Carrillo I got good results with only those corrections. Can you describe the error that you get?
11th Nov 2020, 6:25 AM
Brian
Brian - avatar
0
Trace back (most recent call last): file "./Playground/file0.py", line 6, in <module> B = int(input()) EOFError: OEF when reading a line It shows me that up
11th Nov 2020, 6:35 AM
Julio Carrillo
0
Hey, thanks. My problem is done. But I think I have to change some value because the result is incorrect.
11th Nov 2020, 6:58 AM
Julio Carrillo