Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The information in DNA is stored as a code made up of four chemical bases which are represented by four upper case letters A ,
The information in DNA is stored as a code made up of four chemical bases which are represented by four upper case letters A T G C An example DNA
sequence could be : ATGAG.
An interesting phenomena here is that when two DNA sequences are attempted to combine, A can only pair with whereas can only pair with
Two DNA sequences for example ATGC and TACG are considered 'fully complementary' because the bases letters in every index position can be
paired to each other see the image
Fully Complementary
SNP
Non Complementary
Two DNA sequences for example ATGC and TACC are considered SNP type' because there is exactly one index position last position in this case in
which the basesletters can not be paired.
Two DNA sequences for example ATGC and TTCA are considered 'non complementary' because there are more than one index position second and
fourth in this case in which the bases can not be paired.
Write a program that will ask the user to input two DNA Sequences. The program must check the following:
The first sequence must contain letters only, the letters must be upper case, it must contain only letters
The second sequence must satisfy the same requirementrs as sequence additon to that it maust have the same length as sequnce
If any of the above condition is violated, the program will prompt the user to correct hisher input
With two valid DNA Sequences codes the program will try to identify if the given sequences are 'Fully Complementary', 'Non Complementary', SNP type'
Suggestive Steps:
a Accept two DNA sequences from the user as strings and validate them as shown above
b scan through the index position to length of both the strings
c in every index position match the letters from the two strings
d if the letters in a position are A vs or or or they are considered as pair
e keep a count of no of pairings to finally decide if the sequences are fully complementary, SNP or non complementarySample run #
Enter the DNA Sequence :ATGC
Enter the DNA Sequence :AAAA
The sequences are non complementary
Sample run #
Enter the DNA Sequence :AATTG
Enter the DNA Sequence : TTAAC
The sequences are fully complementary
Sample run #
Enter the DNA Sequence :GCCTA
Enter the DNA Sequence :CGAAT
The sequences are SNP type
Sample run #
Enter the DNA Sequence : ase
Please input uppercase letters
Enter the DNA Sequence :ASE
Please input only letters: A T G C
Enter the DNA Sequence :GCCCA
Enter the DNA Sequence :
Please input only letters
Enter the DNA Sequence :AS
Please input only letters
Enter the DNA Sequence :CTTA
sequence must have same length of sequence
Enter the DNA Sequence :CTTAA
The sequences are non complementary
#witefile
HWQpy
## Uncomment the above line after you finish your code,
# in order to generate the Python submission file.
# If you use Notepad to create you python files, delete
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