Loading exercise...

Exercise: Compute a Distance

Avatar image for Dino

Dino on June 16, 2026

If I am supposed to nest, then please provided example. Confused here.

Avatar image for Bartosz Zaczyński

Bartosz Zaczyński RP Team on June 20, 2026

@Dino “Nesting” just means putting one function call inside another, so the inner one runs first and its result is passed to the outer one. For example:

>>> round(abs(-4.567), 1)
4.6

Here, abs(-4.567) runs first and gives 4.567, then round(..., 1) rounds that to one decimal place. The last hint literally says Nest abs() inside round() 😉

Become a Member to join the conversation.