Skip to content
Worked Examples · Example 7.6

Q.Example 7.6:
from math import ceil,sqrt
value = ceil(624.7)
sqrt(value)

Odisha ChseTextbookSubjective· 2mImportance★★★★★est
20% · 8/40 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Example 7.6 imports two functions at once (from math import ceil,sqrt); ceil(624.7) rounds up to 625, and sqrt(625) evaluates to 25.0.

The idea. The from module import name1, name2 form can pull in several attributes in one statement — here ceil (smallest integer >= x) and sqrt (square root) from the math module, both then callable without the math. prefix.

>>> from math import ceil,sqrt
>>> value = ceil(624.7)
>>> sqrt(value)
25.0

Step-by-step trace

StepExpressionResultWhy
1ceil(624.7)625ceiling = smallest integer not less than 624.7
2value = 625—assignment; nothing displayed
3sqrt(value) = sqrt(625)25.025 × 25 = 625; math.sqrt always returns a float

Expected output — only the last expression echoes in the interactive shell:

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.