Question: Python: Modify the class GATTACA example to be a list of Students who are on the Honor Roll Can I have python language and the
Python:
Modify the class GATTACA example to be a list of Students who are on the Honor Roll
Can I have python language and the output.
# GATTACA # adenine (abbreviated A), cytosine (C), guanine (G) and thymine (T) class Gene: def init (self, aName, FirstNType): self.Name aName self.BasePairs - 1 print ("Gene", self.Name , "constructed . ") # Remove after Testing self.CurrentNTself.FirstNTNucleotide(FirstNType) def AddNT (self, NType): self.FindEnd () self.CurrentNT.NextNT Nucleotide (NType) self .BasePairs += 1 self.CurrentNTself.CurrentNT.NextNT return self.CurrentNT def FindEnd (self): while self.CurrentNT. NextNT: self.CurrentNT self.CurrentNT.NextNT return self.CurrentNT def Display (self): print( "Gene:". self.Name, self.BasePairs, NTs:") self.currentNT = self. FirstNT self.FirstNT.Display() while(self.CurrentNT.NextNT): self.CurrentNT self.CurrentNT.NextNT self.CurrentNT.Display) class Nucleotide: def init (self, Symbol) self.Symbol Symbol if (Symbol'A') self-Name "Adenine" self.ass 135.13 # g/mol self.Formula C5H5NS elif (Symbol == 'c'); self.Name"Cytosine sel f. Mass- 111.10 # g/mol self.Formula "C4H5N30 elif (Symbol'G') self.Name "Guanine self . Mas s = 151.13 g/mol self.Formula-C5H5N50 elif (Symbol'T self.Name "Thymine self.Mass = 126.11 # g/mol
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
