Find the error in the following Python code. Rewrite the code by making corrections.
A=INT(input(enter a number)
Sum=A+10
Output(The sum is ,Sum)
*Pls don’t spam*
Answers
Answered by
17
Answer:
Errors:
A correct program will go like:
Answered by
16
Corrected code
A = int(input("enter a number: "))
Sum = A + 10
print("The sum is", Sum)
You can also rewrite it as follows
print("The sum is", (A := int(input("enter a number: ")) + 10))
Similar questions