Why does this app glitch? | Sololearn: Learn to code for FREE!


Why does this app glitch?

Python simple calculator says test is right but won’t let me finish the test.. says try again Simple calculator… X = 2 Print (x + 8) Is this correct? For output 10

5/22/2022 3:26:04 PM


11 Answers

New Answer


"Write a program to take two integers as input and output their sum." In your code you are not taking any input.


Hi JordanMcNamara ! When you run your code, and get an error message, take that as a hint to start searching for the error. In the error message you got, Python respond that it don’t recognize the name ’Print’. Thats because the Python built-in functions name is ’print’. >>> X = 2 >>> Print (x + 8) Traceback (most recent call last): File "file0.py", line 2, in <module> Print (x + 8) NameError: name 'Print' is not defined


Reread the instructions carefully.


I have also noticed that you need to also use lowercase p in the print statement, because you are telling that there is a variable named Print, not telling to print that.


Thank you eveyone I honestly appreciate this community, im glad i asked the question.


x = int(input()) y = int(input()) print (x + y)


Python is also case sensitive. So the variable “X” is different than the variable “x”


Ok thanks much appreciated Simon i understand what you mean. 👍🏼


Yes, correct


There is some sort of glitch cause sometimes it says im supposed to output 9. When it says try to output 10. Thanks for your response


First of all clear you Application Data and Cache Memory then login again