Computer Science

Which of the following expressions results in an error?

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

Python Funda

2 Likes

Answer

int('12.5')

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

Answered By

1 Like


Related Questions