Question
LearningObjectives: Using Python and Spyder Writing Python programs Working with variables Working with Strings Writing a very simple function of one parameter Understanding nucleobase structure
LearningObjectives:
Using Python and Spyder
Writing Python programs
Working with variables
Working with Strings
Writing a very simple function of one parameter
Understanding nucleobase structure
The structure of DNA is made of long chains of nucleotides.Each nucleotide includes deoxyribose,a phosphate group,and a base,one of :Adenine,Thymine,Cytosine,or Guanine,denoted by the letters A,T,C,G. This lab will consist of a basic manipulation of a sample string of DNA
Part1:Length of the DNA string
Write a program that sets the number of bases of each type (A, C, T, G) in a DNA string and computes and prints its length. That is, you should assign four variables to positive integers of your choice for a hypothetical DNA string you make up, and then compute and print the total length of your made up DNA string. Reminder: You should have a variable for the number (total count) of each base and your program should print the total.For example,for a string with 245As, 5069Cs, 713Ts, and 2934 Gs the program should print The total length of the DNA string is 8988". Part2:DNA:Extracting the rst three bases
Write a function called get_codon that takes one string input (presumed to be a DNA string) and prints out the rst three letters of that input DNA. For example, a call to get_codon("ACTGCAT") should print out "ACT".
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started