Course Level
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type

This assignment introduces the concepts of bio-computation and genetics and how programming is used to help solve current-day problems in those fields. Specifically this assignment looks at skin type, type-2 diabetes, exercise and diet. It includes references to a website with a diagram showing how the genotypes for exercise and diet interrelate and students need to develop code to implement the diagram. Learning objectives include: command-line arguments, data structure (python dictionary), if-else, loops, file input, writing user-defined functions.

The author of this material was awarded a 2016 NCWIT Engagement Excellence Award for this assignment. Learn more about the award on the NCWIT awards page.


A great way to introduce this assignment is to have a guest lecture come to talk about DNA sequencing. Please reference the attached Implementation paper for more information about student struggles, pair programming, problem-solving and testing ideas for this assignment.

Engagement Highlights

This assignment shows how relevant programming is to another discipline in the world of bioinformatics and genetics. Students find the assignment very meaningful as it analyzes real human DNA sample data, which they can also use on their own DNA data if they wish. Students who read through how the analysis of the data is done will gain some introductory insight in how research is conducted and compared. This assignment exercises a student's problem-solving skills with a complex nested if-else structure for exercise and diet, and lends very well to pair-programming opportunities.

Materials and Links

Computer Science Details

Programming Language
Other Programming Language

Material Format and Licensing Information

Creative Commons License