-
Notifications
You must be signed in to change notification settings - Fork 0
Topic 2 assignment
You have the list of genes below:
- BRCA1 – Associated with DNA repair and linked to breast cancer susceptibility.
- TP53 – Encodes the p53 protein, which regulates the cell cycle and prevents tumor growth.
- EGFR – Codes for the epidermal growth factor receptor, involved in cell growth and differentiation.
- APOE – Associated with lipid metabolism and Alzheimer's disease risk.
- CFTR – Mutations in this gene cause cystic fibrosis.
- MYC – A regulator gene that codes for a transcription factor involved in cell proliferation.
- HBB – Encodes the beta-globin subunit of hemoglobin; mutations lead to sickle cell disease.
- ACTB – Encodes beta-actin, important for cell structure and motility.
- MTHFR – Involved in processing amino acids, important for folate metabolism.
- FTO – Associated with fat mass and obesity susceptibility.
- KRAS – Involved in cell signaling pathways and frequently mutated in cancers.
- ACE – Codes for angiotensin-converting enzyme, important in blood pressure regulation.
Write a short program in python to create a dictionary with all of this information. The user should be responsible for entering the information for each gene.
For this assignment, I'm going to give you the steps. You need to figure out the syntax necessary to make the script work.
-
Initiate an empty dictionary.
-
Initiate a while loop to allow for entering multiple items to the dictionary.
-
Generate an input request to determine if a input gene name.
-
Condition the entry. If 'exit', stop. Otherwise, ask for additional information.
-
Generate an input request for additional information.
-
Add the new pair to the empty dictionary.
-
Print the dictionary and a description of it.
Example code for all of these steps were include in the Week 2 lecture.
Save your code as 'dictionary.py'
Upload your code to blackboard for discussion at least 24 hours before next weeks's class.
Also upload your code to your github repository.
You will be asked to walk us through the code.
Warning
Don't forget about indentation in while and if statements.