Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ“œ WIP Final assignments #5761

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
263 changes: 263 additions & 0 deletions content/adventures/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5269,3 +5269,266 @@ adventures:
{sleep}
{print} 'Happy New Year!'
```



hospital:
name: Hospital
default_save_name: Hospital
description: Hospital
levels:
1:
story_text: |
There is a horribly long line at our front desk and the employee is very busy. Could you help this employee by programming a self registration kiosk?

### Exercise
The self registration kiosk should:
* Greet the patient
* Ask for their name and repeat it back
* Ask for their date of birth and repeat it back
* Ask on which department they have their appointment
* Ask with which doctor they have their appointment
* Thank the patient for succesfully registering
* Tell the patient to take a seat in the waiting room
2:
story_text: |
Our hospital does not only have a lot of patients, but also a lot of personnel. Each member of the staff needs a badge that states their information.
Can you make a program so that a new employee can fill in their information and gets a badge printed?

### Exercise
The program should should:
* Welcome the new employee
* Ask them their title, first name, last name, date of birth, place of birth, function, department and personnel number.
* Thank the new employee and tell them their badge will be printed soon.
* Pause the program for 2 seconds.
* Print the title, first name and last name.
* Print the date of birth and the place of birth.
* Print the function and department.
* Print the personnel number.

3:
story_text: |
There is a problem in the nurses' office. All the nurses are complaining that the shedule for the night shifts is unfair. Some nurses have to work 2 night shifts a week, while others work none at all.
Can you help our nurses by creating a program that makes a fair night shift schedule?

### Exercise
The program should:
* Show which nurse has to work the night shift on which day of the week.
* Make sure that each nurse has to work only one night shift a week.

The nurses names are: Meredith, Miranda, Alex, Derek, Christina, Izzy, George
4:
story_text: |
Our nurses have a lot of tasks to accomplish in one day. One of these tasks is going around all the patients in the morning and ask them what they would like to have for breakfast.
Can you lessen the workload of our nurses by creating a program in which the patients choose their breakfast and send their order directly to the kitchenstaff?

### Exercise
The program has to:
* Ask the patient to enter their name and roomnumber
* Greet the patient by their name
* Display all the food (sandwiches, cereal, fruit etc.) and drinks on the menu
* Ask the patient what they would like to eat
* Ask them what they would like to drink
* Repeat the order back to the patient
* Thank the patient for ordering
* Tell them that their order will be brought to their roomnumber in 15 minutes.
5:
story_text: |
Our midwifes get a lot of questions from pregnant ladies about what they can and can't eat while pregnant. Can you help their patients by creating an app that tells them if food is safe or not?

### Exercise
Program should:
* Ask the patient what they would like to eat.
* Checks if it is in the list with 'unsafe food'
* If it is in the list with unsafe food, it tells the patient it is unsafe to eat.
* If it is not on the list, it tells the patient that it is probably safe to eat.
* Then the app also warns the person to always use common sense because the list might not be 100% complete. And it advises the person to always avoid raw meats, fish and eggs and alcohol.

When you are pregnant it is unsafe to eat: sushi, shrimp, tuna, blue cheese, tiramisu, runny eggs, carpaccio, rare steak, tartar
6:
story_text: |
Our nurses keep track of the fluid balance of our patients. The fluid balance is how much fluid the patient has gained today (by drinking, eating or IV) minus how much fluid the person lost today (by peeing or vomiting).
The fluid balance needs to stay positive. If the fluid balance is negative the nurse needs to administer more IV fluid.
Can you help our nurses by making a tool they coudl use to calculate their patients fluid balance?

### Exercise
The program should:
* Ask how much fluid the patient gained from drinking that day.
* Ask how much fluid the patient gained from eating that day.
* Ask how much fluid the patient gained from their IV that day.
* Ask how much fluid the patient lost from peeing that day.
* Ask how much fluid the patient lost from vomiting that day.
* Calculate the patients fluid balance and display it to the nurse.
* Tell the nurse to check whether the balance is positive or negative to decide if the patient needs more IV fluid today or not.
7:
story_text: |
Our helipad for the trauma helikopter has lost its paintcoat. Can your write a program for the turtle to redraw the markings?

### Exercise
Draw the markings on the helipad.
<img src="https://github.com/user-attachments/assets/96deeb9e-b155-4a3d-91f3-3c447df7ce2b" width="200">

8:
story_text: |
Our ambulance is due for some service. The painted red cross on the side is fading and the siren is no longer working.
Can you fix it?

### Exercise
The program should:
* Paint a red cross with the drawing turtle.
* Make a siren sound after finishing the red cross.

HINT: use the repeat command.

9:
story_text: |
The staff at our emergency room has a problem. They say that there are a lot of patients coming in who don't really have an emergency and who should actually go to their gp.
These people are filling up the waiting room and putting a lot of workload on our staff. Will you help the emergency room staff by making a triage app that tells the patient if they have to go to the emergency room or not?

### Exercise
Your program should tell the patient if they should 'go to the emergency room a.s.a.p.', 'call your healthcare provider to discuss your situation' or 'go to your own gp at earliest convenience'.
The programm will ask these questions:
* Is your situation life-threatening?
* Do you experience trouble breathing?
* Are you suddenly not able to speak, see, walk, or move?
* Did you ingest or inhale poison?
* Did you break a bone?
* Do you have a serious allergic reaction?
* Are you in severe pain?

If the patient answers 'yes' to any of these questions, the program will tell them to go to the emergency room a.s.a.p.. It will not ask any other questions, because time is of the essence.
If the patient answers 'no' to all the questions the program will ask:
* Can it wait till tomorrow?

If the answer is 'yes' the program will tell the patient to go to the gp at their earliest convenience. If the answer is 'no' the program will advise to call their healthcare provider to discuss the situation.

10:
story_text: |
We have a problem in the vaccination clinic. The screen that calls the next patient to go to the vaccination area is broken down. Can you fix it?

### Exercise
The program should:
* Have a list of names from patients with an appointment
* Ask the nurse if there are any new patients today and if so how many.
* Add the names of the new patients to the list as well
* Then the program should call on a patient to go to the vaccination area.
* The program should wait 10 seconds, clear the screen and call on the next patient, until every patient on the list has been called on.

11:
story_text: |
The maternity ward of our hospital would like some music for the babies to fall asleep to. Can you program a lullaby?

### Exercise
Choose a song to play:
* Mary had a little lamb (easy)
* Itsy Bitsy Spider (medium)
* Brahms lullaby (hard)
HINT: You can try to think of the correct musical notes yourself, but you can also search for them on the internet.
12:
story_text: |
We are designing a new hospital ward and we would like to draw a floorplan for this new ward.
We would like to have room for 5 patients in the ward. All patients should get a bed and a bedside table.
The floorplan should look something like this:
<img src="https://github.com/user-attachments/assets/078929cb-c9af-4bcf-87a2-0398ad91d3f0" width="500">

### Exercise
The program should:
* Draw the floorplan for the new ward!
* Use functions to draw the beds and bedside tables.

13:
story_text: |
Our janitors have a big list of tasks. Some tasks are done everyday, others on a certain day, season or date. This is very confusing and leads to situations where some tasks are forgotten.
Can you help by writing a program that'll print the correct tasklist for that day?

### Exercise
The program should:
* Wish the janitor a goodmorning.
* Ask the janitor what day of the week it is, which month and which day of the month.
* Print the correct tasklist for that day.

The tasks that should be done:
* Everyday tasks: mop the floor, clean the toilets, open the curtains
* On mondays and thursdays: water the plants
* On tuesday and fridays: mop the floors
* On saturdays: wash the coffeemachine
* On the first of each month: wash the windows
* On the 7th of each month: refill the vending machines
* On the 14th of each month: check the batteries for the fire alarms
* Everyday in wintermonths: turn on the heaters
* Everyday in summermonths: turn on the airconditioning

example_code: |
The program should end like this:
```
{call} make_tasklist {with} day, month, date
```

14:
story_text: |
Our anesthesiologist has to calculate how much anesthetics to give our patients who'll undergo an operation. This depends on a couple of factors: weight, age, length of surgery and drug tolerance.
Can you help our anesthesiologist by making a program that'll calculate the amount for them?

### Exercise
The program should:
* Contain a function that calculates how much anesthetics should be given to the patient and returns the value.
* The amount of anethetics in ml = weight of the patient in kilograms devided by 600.
* If the patient is older than 80 this amount should be muliplied by 0.8.
* If the patient is younger than 20 this amount should be multiplied by 1.2.
* Then the amount is multiplied by the amount of minutes that the surgery takes.
* If the drug tolerance from this patient is 'high', add 10 more ml.
* If the drug tolerance is 'low', subtract 10 ml.
* If the drug tolerance is 'normal', don't add or subtract anything.
* When the program has calculated the amount of anestehics it returns the value, and tells the anesthesiologist how much anesthetics to administer.
15:
story_text: |
After surgery our patients can sometimes experience a lot of pain. In those cases our patients can be given a morphine pump. They can administer some morphine themselves if they are in pain.
These pumps need to be programmed very carefully, so that the patients don't give themselves too much morphine. Can you program a morphine pump for us?

### Exercise
The program should:
* Ask the nurse how many milliliters of morphine the patient has already had today.
* Tell the nurse to give the program to the patient
* Ask the patient how much pain they are experiencing on a scale of to 10.
* Tell the patient to press the x button if they would like some more morphine.
* Call the function start_pump with arguments pain_level and morphine_level if x is pressed.
* The function should print 'You will be administered 20 more ml of morphine' while the patients pain level is higher than or equal to 6 and the morphine level is lower than 120.
* After administering new morphine the program should sleep for 2 minutes (while testing your program you can use 2 seconds).
* After those 2 minutes, the morphine level should be updated (+20ml) and the pain level should be updated by asking the patient how they are feeling now.
* If the morphine level is too high or the patient is no longer in pain, the program should tell the patients that they won't be getting more morphine. If they are in a lot of pain, tell them to call the nurse.
* Tell the patient that the pump will be shut down now, and to press x if they need the pump to start again.
16:
story_text: |
Our medical students have to learn the medical terms for all the bodyparts. They seem to be struggling to remind all the anatomical names and they seem to find the studying very boring.
Can you help them by creating a game that allows them to practise the medical terms?

These are the terms that the students need to know: corpus = body, caput = head, ocolus = eye, nasus = nose, auris = ear, os = mouth, collum = neck, manus = hand, pectus = chest, humerus = shoulder, venter = stomach, tergum = back

### Exercise
The program should:
* Be a game that allows the students to practise the medical terms.
* Give the students a point and a compliment when they have got the right answer.
* Take away a point and tell them the answer is incorrect when they have got the answer wrong.
* Also show the students the correct answer for a couple of seconds if they have given the wrong answer, wipe the answer off the screen again and keep asking the question until they have got it right.
* Keep playing until the student has answered all the questions correctly.
* Show the final score to the student.
* Give the student feedback based on their score: 12 points: Amazing!, 8 - 11 points: Good job, keep practising!, 7 or less: You should study more!

17:
story_text: |
Our centre for burnwounds would like to lessen the workload by using an online triage tool. This way the patients can not only register their name and date of birth, but also what kind of burnwound they have (first, second or third degree) and advise on what to do next.
Can you help them?

### Exercise
The program should:
* Start with a greeting and simple registration of the patients name and date of birth
* Preform a triage. Is the skin only red: first degree burn. Are there blisters: second degree burn. Is the skin gone/blackened/whitened from the burn: third degree burn.
* Give the patient the appropriate advise. First degree: Cool the burn with water and apply some cream on it. You do not need to see a doctor. Second degree: The doctor will see you and prescribe a special cream. Please wait in the waiting area. Third degree: Please go the the service desk now. You will need urgent care a.s.a.p.
Hint: please use the {elif} command and functions to create this code.
example_code: |
The end of your code should look like this
```
{call} registration
degree = {call} triage
{call} advise {with} degree
```
Loading
Loading