Question: Identify which type of error is occurring in this code, and what is causing that error. # Goal Add the 2 entered numbers together: 1

Identify which type of error is occurring in this code, and what is causing that error.
# Goal Add the 2 entered numbers together: 12+13=25
x = input("Enter a number: ")
y = input("Enter another number: ")
print(x + y)
Choice 1 of 6: Syntax error, cannot give the input function a parameter
Choice 2 of 6: Syntax error, colon inside of a string is not allowed
Choice 3 of 6: Runtime error, you cannot add int's and strings together
Choice 4 of 6: Runtime error, The user types in a number but it's saved as a string
Choice 5 of 6: Logic error, the comment describes addition but the operation occurring is concatenation
Choice 6 of 6: Logic error, printing the result of addition directly will result in None being printed out

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!