180k views
4 votes
What would you expect as the result of the code print(1 + 4)?

A.
"1 + 4"
B.
print(1 + 4)
C.
five
D.
5

User Syma
by
8.2k points

1 Answer

2 votes
D, you're adding numbers and it will just print the result in integers not in string format.

You have 4 basic types of data in Python:

Integer -> non-decimal number i.e. 1,2,3,4,5...

Float -> decimal number
i.e. 0,128

Boolean -> true or false
(that is clear enough I think?)

String -> text as in a textbook i.e. You won the lottery.
User Krembanan
by
7.4k points