File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
exercises/practice/space-age/Sources/SpaceAge Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change 11class SpaceAge {
2- var seconds : Float = 0
3-
4- var onMercury : Float { return ( ( seconds / 7_600_530.24 ) * 100 ) . rounded ( ) / 100 }
5- var onVenus : Float { return ( ( seconds / 19_413_907.2 ) * 100 ) . rounded ( ) / 100 }
6- var onEarth : Float { return ( ( seconds / 31_558_149.76 ) * 100 ) . rounded ( ) / 100 }
7- var onMars : Float { return ( ( seconds / 59_354_294.4 ) * 100 ) . rounded ( ) / 100 }
8- var onJupiter : Float { return ( ( seconds / 374_335_776.0 ) * 100 ) . rounded ( ) / 100 }
9- var onSaturn : Float { return ( ( seconds / 929_596_608.0 ) * 100 ) . rounded ( ) / 100 }
10- var onUranus : Float { return ( ( seconds / 2_661_041_808.0 ) * 100 ) . rounded ( ) / 100 }
11- var onNeptune : Float { return ( ( seconds / 5_200_418_592.0 ) * 100 ) . rounded ( ) / 100 }
12-
13- init ( _ input: Float ) {
14- self . seconds = input
15- }
2+ // Write your code for the 'SpaceAge' exercise in this file.
163}
You can’t perform that action at this time.
0 commit comments