What will be the output of the following code snippet?

What will be the output of the following code snippet?

print(3 / 5)
A . 6/10
B. 0.6
C. 0
D. None of the above.

Answer: B

Explanation:

Topic: division operator

Try it yourself:

print(3 / 5) # 0.6

print(4 / 2) # 2.0

The division operator does its normal job.

And remember the division operator ALWAYS returns a float.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments