Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Dosage Calculator for Multiple Patients | Dosage Calculations and Patient Safety
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Pharmacists

bookChallenge: Dosage Calculator for Multiple Patients

Building on your previous experience with function-based dosage calculations and handling patient data, you are now ready to tackle a more complex scenario: calculating medication dosages for multiple patients at once. In real pharmacy practice, you often need to process a list of patients, each with individual characteristics such as name, weight, and prescribed dose per kilogram. Efficiently iterating through this data and producing accurate results is essential for patient safety and effective workflow management.

Tarefa

Swipe to start coding

Write a function that processes a list of patient dictionaries, each containing name, weight_kg, and dose_per_kg. The function must:

  • Calculate the total dose for each patient by multiplying weight_kg by dose_per_kg.
  • Return a list of dictionaries, each with the patient's name and their calculated_dose.
  • Print the name of the patient with the highest calculated dose.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 3
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Dosage Calculator for Multiple Patients

Deslize para mostrar o menu

Building on your previous experience with function-based dosage calculations and handling patient data, you are now ready to tackle a more complex scenario: calculating medication dosages for multiple patients at once. In real pharmacy practice, you often need to process a list of patients, each with individual characteristics such as name, weight, and prescribed dose per kilogram. Efficiently iterating through this data and producing accurate results is essential for patient safety and effective workflow management.

Tarefa

Swipe to start coding

Write a function that processes a list of patient dictionaries, each containing name, weight_kg, and dose_per_kg. The function must:

  • Calculate the total dose for each patient by multiplying weight_kg by dose_per_kg.
  • Return a list of dictionaries, each with the patient's name and their calculated_dose.
  • Print the name of the patient with the highest calculated dose.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 3
single

single

some-alt