What is the expected output of the following code?

What is the expected output of the following code?

x = 1 + 1 // 2 + 1 / 2 + 2

print(x)
A . 3
B . 4.0
C . 4
D . 3.5

Answer: D

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments