Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.3 KB

instructions.append.md

File metadata and controls

26 lines (19 loc) · 1.3 KB

Instructions append

For the Python track, this exercise asks you to create a SpaceAge class (concept:python/classes) that includes methods for all the planets of the solar system. Methods should follow the naming convention on_<planet name>.

Each method should return the age ("on" that planet) in years, rounded to two decimal places:

#creating an instance with one billion seconds, and calling .on_earth().
>>> SpaceAge(1000000000).on_earth()

#This is one billion seconds on Earth in years
31.69

For more information on constructing and using classes, see: