$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #38

What is printed?

print(2 == 2.0)
  1. True
  2. False
  3. 1
  4. None
Python compares int and float by value, so 2 equals 2.0.
Play Problem Solving ▸