interplane.Get Omega
Read in your language

omega-rosetta

aien-dev/omega-rosetta

Brought by drakestapleton

branch main Branches Tags History

omega-rosetta / exercises / space-age / space-age.om

12 lines · 664 bytes Raw Blame History
1note Exercism-style exercise "space-age": https://exercism.org/tracks/python/exercises/space-age
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note age is how old someone of the given seconds is in years of planet: one Earth year is 31557600
4note seconds; orbital periods in Earth years are Mercury 0.2408467, Venus 0.61519726, Earth 1.0,
5note Mars 1.8808158, Jupiter 11.862615, Saturn 29.447498, Uranus 84.016846, Neptune 164.79132.
6note age is -1.0 when planet is not one of these names.
7note Check it with: sh exercise.sh exercises/space-age
8om2
9fn age planet view uchar * seconds f64 to f64
10note replace this line with your solution
11trap 13
12end