146k views
1 vote
What is the result of the following program? print(“10 + 2”) print(3 + 5) 12 8 10 + 2 3 + 5 12 3 + 5 10 + 2 8

1 Answer

1 vote

Answer:

print(“10 + 2”) Will output "10 + 2" without the quotation marks. This is because the text to print is encapsulated in quotation marks, indicating a "string literal." This means, to put it simply, it will always print what you put there even if it's a math equation.

User Egbrad
by
5.4k points