Orbit Clock
The space station circles Earth about every 92 minutes. Its mission log stores time in minutes only, so a reading like 1565 means nothing at a glance.
Build the clock the crew has been asking for. You'll need two operators: //, which divides and drops the remainder, and %, which gives just the remainder.
Finish stage 1 to unlock this stage.
The program reads the mission time in minutes. Print it as full hours and the minutes left over. For 320:
5 h 20 min
Finish stage 1 to unlock this stage.
One orbit takes 92 minutes. Below the time, print how many full orbits the station has completed, and how many minutes it is into the current one. For 320:
5 h 20 min Orbits completed: 3 Minutes into this orbit: 44
Finish stage 2 to unlock this stage.
Missions last for days, and 26 h 5 min is hard to read too. Add days to the first line: full days first, then the hours and minutes left over. The orbit lines stay as they are. For 1565:
1 d 2 h 5 min Orbits completed: 17 Minutes into this orbit: 1
Short missions show 0 d: 320 is 0 d 5 h 20 min.
Hints
Floor Division and Modulo
# Floor division (//) and modulo (%)
# ISS completes one orbit every 92 minutes
# How many full orbits in 24 hours?
minutes_in_day = 24 * 60
orbit_period = 92
full_orbits = minutes_in_day // orbit_period
remaining = minutes_in_day % orbit_period
print("Full ISS orbits per day:", full_orbits)
print("Minutes into next orbit:", remaining)
# Mars signal delay: 1,124 seconds
# Break into minutes and seconds
signal_delay = 1124
minutes = signal_delay // 60
seconds = signal_delay % 60
print(f"\nMars signal delay: {minutes} min {seconds} sec")
# Distribute 50 rations among 6 crew members
rations = 50
crew = 6
per_person = rations // crew
extras = rations % crew
print(f"\nRations per astronaut: {per_person}")
print(f"Extra rations: {extras}")
# Check if a mission number is even or odd
mission = 42
if mission % 2 == 0:
print(f"\nMission {mission} is even")
else:
print(f"\nMission {mission} is odd")
Separate arguments with commas. They're passed on every Run as sys.argv[1:].