0
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
11 Answers
+ 6
"Write a program to take two integers as input and output their sum."
In your code you are not taking any input.
+ 4
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
+ 3
Reread the instructions carefully.
+ 3
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.
+ 3
Thank you eveyone I honestly appreciate this community, im glad i asked the question.
+ 2
x = int(input())
y = int(input())
print (x + y)
+ 2
Python is also case sensitive. So the variable âXâ is different than the variable âxâ
+ 1
Ok thanks much appreciated Simon i understand what you mean. đđŒ
0
Yes, correct
- 1
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
- 1
First of all clear you Application Data and Cache Memory then login again