Skip to main content
Version: 1.19

Chapter 3

Zee is now entering France πŸ‡«πŸ‡· and during the battle with Hydra lost the Boots of Hermes. It is 7:00 AM and our friend has to continue by foot. πŸšΆβ€β™‚οΈ The goal is to walk to Lyon which is 729.1 kms distance.

Considering average walking speed is 5 km/h how many days would Zee need to walk without taking many rest?, and at what time would Zee reach Lyon?

First determine the number of days using expressions were already used distance / speed. In this case: 729.1 / 5 = 145 hrs. To determine arrival time, we can leverage modular clock (24 hours) arithmetics using the function modulo().

Expression

// use a 24 hour clock
hours + startingHour

Context

A JSON document that is used to resolve variables in the expression.
{
  "startingHour": 7,
  "hours": 145,
  "modulus": 24
}


Result

<click 'Evaluate' to see the result of the expression>

Warnings

<none>
Solution
Zee would take 6 days to arrive and would be there at 8:00 AM.

Expression
modulo((hours + startingHour), modulus)