QUESTION IMAGE
Question
multiple choice
what is the output for the following line of code?
>>int(2.8)
3
2.8
2
2.8
Step1: Understand int() function
The int() function in Python truncates the decimal part of a floating - point number and returns the integer part.
Step2: Apply to 2.8
When we apply int() to 2.8, we discard the decimal part. So int(2.8) = 2.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
C. 2