Assignment 01
Deadline: 1 1 : 5 9 P M , April 11, 2024
Description:
A medical prescription for corticoids after the kidney transplant has a degressive
dose. The doctors make this prescription by hand computing the dates and hand it to
the patient as a text.
We want to help the doctors make this process automatic.
Here is how is the prescription made:
1. Start with a dose of 1 milligram for every kilogram of the patient's weight, rounded to
the nearest multiple of 5. Maintain this dose for 21 days.
2. Afterwards, decrease the dose by 5 milligrams each week until reaching 30
milligrams. Stay on the 30 milligram dose for 21 days.
3. Then decrease by 2.5 milligrams every 5 days until reaching 15 milligrams.
4. Reduce the dose by 1 milligram every 10 days until reaching 0.
5. Stop the treatment at dose zero.
Your task is as follows:
1. Write a program which will ask the user to enter the initial date of the treatment, the
weight of the patient and the name of output file and you will create a text file
containing the prescription.
Suppose I enter 70 kilograms starting from 12/04, 12 is the day and 4 the
month and I call my output file as “dosage”.
Note: you can use other date formats as far as it is clearly explained.
The output of your program is a text file as follows:
CORTANCYL : Decreasing dose protocol :
- 70 mg from 12/04 to 03/05
- 65 mg from 04/05 to 10/05
- 60 mg from 11/05 to 17/05
- 55 mg from 18/05 to 24/05
- 50 mg from 25/05 to 31/05
- 45 mg from 01/06 to 07/06
- 40 mg from 08/06 to 14/06
- 35 mg from 15/06 to 21/06
- 30 mg from 22/06 to 12/07
- 27.5 mg from 13/07 to 17/07
- 25.0 mg from 18/07 to 22/07
- 22.5 mg from 23/07 to 27/07
- 20.0 mg from 28/07 to 01/08
- 17.5 mg from 02/08 to 06/08
- 15.0 mg from 07/08 to 11/08
- 14 mg from 12/08 to 21/08
- 13 mg from 22/08 to 31/08
- 12 mg from 01/09 to 10/09
- 11 mg from 11/09 to 20/09
- 10 mg from 21/09 to 30/09
- 9 mg from 01/10 to 10/10
- 8 mg from 11/10 to 20/10
- 7 mg from 21/10 to 30/10
- 6 mg from 31/10 to 09/11
- 5 mg from 10/11 to 19/11
- 4 mg from 20/11 to 29/11
- 3 mg from 30/11 to 09/12
- 2 mg from 10/12 to 19/12
- 1 mg from 20/12 to 29/12
Then stop
2. Create an interface for this program using PySimpleGUI or Tkinter to allow the user
to choose the weight or type it, to choose the starting date on a calendar. Then
uses the navigation to say where the file should be saved. Take care of errors,
and alerts, try to be as interactive as possible to solve the users’ problems.
Submission Guidelines:
Submit a python file and a readme file (maximum one page) as a zip file. Name your file
as id_name_a1. Your python file should be commented, and all functions should have
the doc string.
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
- 网易硬刚腾讯 两大游戏玩家之间的口水仗不断
- 全球“最独特”的一台华为 nova 6 5G 版手机是什么样子的?
- 拼多多抖音淘宝京东,谁是真低价?
- 老杨第一次再度抓握住一瓶水,他由此产生了新的憧憬
- 丰田章男称未来依然需要内燃机 已经启动电动机新项目
- B站更新决策机构名单:共有 29 名掌权管理者,包括陈睿、徐逸、李旎、樊欣等人
- 苹果罕见大降价,华为的压力给到了?
- 三明列东又有房子要拆迁!住这里的人要发了!
- 放大招后,广州又忍不住了…
- 私募积极加仓,百亿股票私募仓位指数创出近八周新高
- 他,传闻中马云最想见的人
- 升级的脉脉,正在以招聘业务铺开商业化版图
- 如何经营一家好企业,需要具备什么要素特点
- 智慧驱动 共创未来| 东芝硬盘创新数据存储技术
- 创意驱动增长,Adobe护城河够深吗?