The Artemis program is a Moon exploration program led by the NASA. Its aim is to re-establish a human presence on the Moon for the first time since the Apollo 17 mission in 1972. It will consists of different missions with a long-term goal of establishing a permanent base on the Moon. The intention is also to facilitate further human missions to Mars.
In this challenge, we will focus on two of the main missions of this program:
- Mission Artemis II which will send 4 astronauts on board the Orion spacecraft to orbit around the Moon and return back to planet Earth
- Mission Artemis III which will send 4 astronauts on board the Orion spacecraft to approach the Moon, place a lunar Gateway Station, and then use this gateway to send 2 astronauts to descend to the lunar surface and and spend about 6.5 days on the surface.
Our aim is to write a Python program to help the engineers at NASA plan these two missions and check whether the planned missions are safe to launch.
Effectively, before launch, the NASA engineers must check if the spacecraft used for the mission is carrying enough oxygen and food for the crew.
Mission Data
We will use the following values in your program:
Crew and Duration
| Mission | Crew | Days |
|---|---|---|
| Artemis II | 4 | 10 |
| Artemis III | 4 | 30 |
Supplies Needed Per Astronaut Per Day
- Oxygen per day = 5 units
- Food per day = 3 units
Spacecraft Capacity
- Maximum oxygen = 800 units
- Maximum food = 500 units
Task 1 – Store the Data in Variables
Create variables for:
-
crew size
number of days
oxygen per day
food per day
maximum oxygen
maximum food
Python Code:
Task 2 – Ask the User to Choose a Mission
Ask the user to enter a mission number:
- 2 for mission Artemis II
- 3 for mission Artemis III
Make sure that the user can only select one of these two options.
Then use an if statement to reset the correct number of days and crew size.
Task 3 – Calculate Supplies Needed
Use the following formulas to estimate the quantity of oxygen and of food that will be required to complete the mission:
-
Total oxygen = crew × days × oxygen per day
Total food = crew × days × food per day
Display the results to the user.
Task 4 – Check If the Mission Is Safe

If both oxygen and food are within spacecraft limits, display:
+--------------------------+
| READY FOR LAUNCH! |
+--------------------------+
Otherwise, display:
+--------------------------+
| NOT SAFE TO LAUNCH! |
+--------------------------+
Task 5 – Display a Mission Report
Display a mission report showing the following information:
- Mission name
- Spaceship
- Crew size
- Duration
- Oxygen needed
- Food needed
- Launch status
Exemplar output:
Mission: Artemis II
Spaceship: Orion
Crew: 4
Days: 10
Oxygen needed: 200 units
Food needed: 120 units
Status: READY FOR LAUNCH
Extension Task 1 – Safety Buffer
For a mission to be considered safe and ready to launch, the engineers at NASA want to allow 15% extra supplies to both oxygen and food before checking safety.
Your task is to change the code to add this extra buffer to booth the required oxygen and food.

Extension Task 2 – Extra Spaceships and Extra Missions
Add an option at the start of your program to let the user pick a different spaceship to complete a mission.
You could have a collection of spaceships to opt for, each spaceship having its own oxygen and food capacity, e.g.
| Spaceship | Oxygen Capacity | Food Capacity |
|---|---|---|
| Orion | 800 units | 500 units |
| Space Voyager | 1200 units | 800 units |
| Deep Space Explorer | 2400 units | 1800 units |
Create additional missions for Artemis Mission III, Artemis Mission IV and Artemis Mission V, each mission having its own crew size, duration (in days) and spaceship. Remember the final aim of the Artemis program is to set foot on planet Mars!
| Mission | Crew | Days |
|---|---|---|
| Artemis II (Moon orbit) | 4 | 10 |
| Artemis III (Moon landing) | 4 | 30 |
| Artemis IV (Lunar station) | 6 | 45 |
| Artemis V (Extended lunar mission) | 8 | 60 |


Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area






