CBSE Class 12 Computer Science Question 28 of 105

Python Revision Tour — Question 12

Back to all questions
12
Question

Question 12

Which of the following expressions results in an error?

  1. float('12')
  2. int('12')
  3. float('12.5')
  4. int('12.5')
Answer

int('12.5')

Reason — int() are positive or negative whole numbers with no decimal point.