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

22nd May 2022, 3:26 PM
JordanMcNamara
11 RĂ©ponses
+ 6
"Write a program to take two integers as input and output their sum." In your code you are not taking any input.
22nd May 2022, 3:34 PM
Simon Sauter
Simon Sauter - avatar
+ 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
23rd May 2022, 6:42 AM
Per Bratthammar
Per Bratthammar - avatar
+ 3
Reread the instructions carefully.
22nd May 2022, 3:30 PM
Simon Sauter
Simon Sauter - avatar
+ 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.
23rd May 2022, 10:10 AM
Danish Zubair
Danish Zubair - avatar
+ 3
Thank you eveyone I honestly appreciate this community, im glad i asked the question.
23rd May 2022, 1:57 PM
JordanMcNamara
+ 2
x = int(input()) y = int(input()) print (x + y)
22nd May 2022, 3:41 PM
JordanMcNamara
+ 2
Python is also case sensitive. So the variable “X” is different than the variable “x”
23rd May 2022, 1:37 PM
Andrew Johnson
Andrew Johnson - avatar
+ 1
Ok thanks much appreciated Simon i understand what you mean. đŸ‘đŸŒ
22nd May 2022, 3:37 PM
JordanMcNamara
0
Yes, correct
23rd May 2022, 1:40 PM
Danish Zubair
Danish Zubair - avatar
- 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
22nd May 2022, 3:32 PM
JordanMcNamara
- 1
First of all clear you Application Data and Cache Memory then login again
24th May 2022, 7:06 AM
Haris Naeem
Haris Naeem - avatar