I have been trying to do this little project where I make a program which the user will input three ammio acids like "ATC" and in return the program will tell it, its protein, but what I have written seems to not do what I want it
Codon = print(input(str("Please enter your codon: ")))
if Codon == ("ATT", "ATC", "ATA"):
print("Isoleucine")
elif Codon == ("CTT", "CTC", "CTA", "CTG", "TTA", "TTG"):
print("Leucine")
elif Codon == ("GTT", "GTC", "GTA", "GTG"):
print("Valine")
elif Codon == ("TTT", "TTC"):
print("Phenylalanine")
elif Codon == "ATG":
print("Methionine")
elif Codon == ("TGT", "TGC"):
print("Cysteine")
elif Codon == ("GCT", "GCC", "GCA", "GCG"):
print("Alanine")
elif Codon == ("GGT", "GGC", "GGA", "GGG"):
print("CodonGlycine")
elif Codon == ("CCT", "CCC", "CCA", "CCG"):
print("Proline")
elif Codon == ("ACT", "ACC", "ACA", "ACG"):
print("Threonine")
elif Codon == ("TCT", "TCC", "TCA", "TCG", "AGT", "AGC"):
print("Serine")
elif Codon == ("TAT", "TAC"):
print("Tyrosine")
elif Codon == "TGG":
print("Tryptophan")
elif Codon == ("CAA", "CAG"):
print("Glutamine")
elif Codon == ("AAT", "AAC"):
print("Asparagine")
elif Codon == ("CAT", "CAC"):
print("Histidine")
elif Codon == ("GAA", "GAG"):
print("Glutamic_Acid")
elif Codon == ("GAT", "GAC"):
print("Aspartic_Acid")
elif Codon == ("AAA", "AAG"):
print("Lysine")
elif Codon == ("CGT", "CGC", "CGA", "CGG", "AGA", "AGG"):
print("Arginine")
elif Codon == ("TAA", "TAG", "TGA"):
print("Stop_Codons")
else:print("Something Went Wrong")
This output:
Please enter your codon: TGA TGA Something Went Wrong
What I want it to output:
Stop_Codon
any suggestions/help would be really appreciated Also I need to make it so it can accept lowercase letters as well, at this stage if one was to enter a lower case codon, it would just not work as intended!