Computer Science
Which of the following expressions results in an error?
- float('12')
- int('12')
- float('12.5')
- 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
The expression 8/4/2 will evaluate equivalent to which of the following expressions:
- 8/(4/2)
- (8/4)/2
Which among the following list of operators has the highest precedence?
+, -, **, %, /, <<, >>, |
- <<, >>
- **
- I
- %
Which of the following statement prints the shown output below?
hello\example\test.txt- print("hello\example\test.txt")
- print("hello\\example\\test.txt")
- print("hello\"example\"test.txt")
- print("hello"\example"\test.txt")
Which value type does input() return ?
- Boolean
- String
- Int
- Float