You’re writing the final part of the game.
Things are breaking down fast. Players have made it this far—now you’re in charge of the final repairs, rescues, and the big ending.
At the start of each part, print the story intro provided. Then follow the instructions to build the code.
Print this at the start:
You teleport into an office floating in the sky. The floor is made of gold coins.
An accountant is frantically calculating something with four calculators.
He shouts: “If I don’t make profit, this entire platform crashes!”
Your tasks:
☐ Ask the player to enter two numbers: income and cost
☐ Calculate the profit (profit = income - cost)
☐ Use an if statement:
If profit > 100, print: “The accountant nods. ‘We’re safe—for now.’”
Else, print: “The office tilts slightly. Maybe don’t look down.”
☐ Add "BusinessPerson" to the rescued_students list
Print this at the start:
You arrive on a football field under a glowing sky.
Injured teammates lie across the turf. A medic is sprinting in circles.
A loudspeaker says: “You must heal your team. No pressure.”
Your tasks:
☐ Create a list of 3 players with low health values (e.g. [25, 30, 40])
☐ Write a function called heal(player_health) that adds 10 and returns the new value
☐ Use a for loop to heal each player and print their new health
☐ Add "MedicPerson" and "FootballPerson" to rescued_students
Print this at the start:
The air freezes. A door appears out of nowhere. A robotic voice says:
‘Check student status. If all have been rescued, initiate escape protocol.’
Your tasks:
☐ Print the list rescued_students
☐ Check if the list has all 8 names
☐ If yes, print: "System stable. Door unlocked. You may now leave."
☐ If no, print: "System unstable. 1 or more students still missing."
☐ Add a robot voice that says “Goodbye” in dramatic slow print
☐ Use .title() to format names before printing the list
☐ Let the player type "exit" or "stay" and print different endings