Nexclap

DNA to Amino Acid Converter

This program asks the user for a length of a DNA strand, it then generates the strand and converts it to RNA. After, it splits the RNA into Codons and then converts it into an Amino Acid Chain.


import random print("Welcome to Royce's DNA to Amino Acid Converter") #asks user for length of chain userlength = int(input("How long should the DNA strand be")) #generates DNA strand allamino = ["A" ,"T" , "C" , "G"] DNA = [] RNA = [] for x in range(0,userlength,1): amino = random.randint(0,3) DNA.append(allamino[amino]) print("This is the DNA Strand " + "\n" + str(DNA)) #converts to RNA for x in range(0,len(DNA),1): if DNA[x] == "A": RNA.append("U") elif DNA[x] == "T": RNA.append("A") elif DNA[x] == "C": RNA.append("G") elif DNA[x] == "G": RNA.append("C") print("This is the RNA strand " + "\n" + str(RNA)) #splits RNA into codons codons=[] amountcodons = len(RNA)/3 for x in range(0,int(amountcodons),1): holder = RNA[x] +RNA[x+1] + RNA[x+2] codons.append(holder) holder = 0 print("This is the RNA split into codons " + "\n" + str(codons)) #converts the codons into amino acids allamino = ["Lysine", "Asparagine","Isoleucine","Methionine","Threonine" ,"Arginine" ,"Serine","Stop Codon", "Tyrosine","Leucine","Phenylalanine","Cysteine","Tryptophan","Glutamine","Histidine", "Proline","Arginine","Glutamic Acid","Aspartic Acid","Valine","Alanine","Glycine"] aminoacid = [] for x in range(0,int(amountcodons),1): if codons[x] == "AAA" or codons[x] == "AAG": aminoacid.append(allamino[0]) elif codons[x] == "AAU" or codons[x] == "AAC": aminoacid.append(allamino[1]) elif codons[x] == "AUA" or codons[x] == "AUU" or codons[x] =="AUC": aminoacid.append(allamino[2]) elif codons[x] =="AUG": aminoacid.append(allamino[3]) elif codons[x] =="ACA" or codons[x] =="ACU" or codons[x]=="ACC" or codons[x]=="ACG": aminoacid.append(allamino[4]) elif codons[x] =="AGA" or codons[x] =="AGG": aminoacid.append(allamino[5]) elif codons[x] =="AGU" or codons[x] =="AGC" or codons[x] =="UCA" or codons[x] =="UCU" or codons[x] =="UCC" or codons[x] =="UCG": aminoacid.append(allamino[6]) elif codons[x] =="UAA" or codons[x] =="UAG" or codons[x] =="UGA": aminoacid.append(allamino[7]) elif codons[x] =="UAU" or codons[x] =="UAC": aminoacid.append(allamino[8]) elif codons[x] =="UUA" or codons[x] =="UUG" or codons[x] =="CUA" or codons[x] =="CUU" or codons[x] =="CUC" or codons[x] =="CUG": aminoacid.append(allamino[9]) elif codons[x] =="UUU" or codons[x] =="UUC": aminoacid.append(allamino[10]) elif codons[x] =="UGU" or codons[x] =="UGC": aminoacid.append(allamino[11]) elif codons[x] =="UGG": aminoacid.append(allamino[12]) elif codons[x] =="CAA" or codons[x] =="CAG": aminoacid.append(allamino[13]) elif codons[x] =="CAU" or codons[x] =="CAC": aminoacid.append(allamino[14]) elif codons[x] =="CCA" or codons[x] =="CCU" or codons[x] =="CCC" or codons[x] =="CCG": aminoacid.append(allamino[15]) elif codons[x] =="CGA" or codons[x] =="CGU" or codons[x] =="CGC" or codons[x] =="CGG": aminoacid.append(allamino[16]) elif codons[x] =="GAA" or codons[x] =="GAG": aminoacid.append(allamino[17]) elif codons[x] =="GAU" or codons[x] =="GAC": aminoacid.append(allamino[18]) elif codons[x] =="GUA" or codons[x] =="GUU" or codons[x] =="GUC" or codons[x] =="GUG": aminoacid.append(allamino[19]) elif codons[x] =="GCA" or codons[x] =="GCU" or codons[x] =="GCC" or codons[x] =="GCG": aminoacid.append(allamino[20]) elif codons[x] =="GGA" or codons[x] =="GGU" or codons[x] =="GGC" or codons[x] =="GGG": aminoacid.append(allamino[21]) print("This is the amino acid chain " + "\n" + str(aminoacid))

3D Modeling : Role in Meta Verse

Here is my blog 3D Modeling : Role in Meta Verse

https://www.siliconvalley4u.com/blogs/3d-modeling-role-in-meta-verse

Country Div Blocks

Adjustment of Exercise Set 7. Following changes have been made: background color, title text color, text margins (removed completely), inline-block display for each box, boxes are centered and placed on a new line

Announcements
  • Test Announcement from Nexclap

    Test message from nexclap - please ignore

    2023-02-13

  • Test message

    Test message from nexclap - please ignore

    2023-02-11

  • Test message

    Test message from nexclap - please ignore

    2023-02-11

  • View all