🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Modules and Libraries: all 14 questions

Quiz: Modules and Libraries · Question 6 of 14

What does this print? (code)

What does this print?

import math
print(math.ceil(4.1), math.floor(4.9))
  1. A.5 4
  2. B.4 5
  3. C.4 4
  4. D.5 5
Answer & explanation

Correct answer: 5 4

ceil rounds up, floor rounds down.

Can you get the rest right without peeking?

Take the timed Quiz: Modules and Libraries quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →