Nexclap

DNA TO RNA CONVERTER

This is a python based DNA converter which converts the DNA to RNA to amino acid chains

sequence = int(input("Enter the length you want the sequence to be")) from random import randint DNA = ["A" , "T" , "C" , "G"] data = [] dnaString = "" for p in range (0,sequence): randomVal = randint(0, len(DNA) -1) x = DNA[randomVal] dnaString = dnaString + x rnaString = "" for x in range(0,len(dnaString), 1): letter = dnaString[x] if letter == "A": rnaString = rnaString + "U" if letter == "T": rnaString = rnaString + "A" if letter == "C": rnaString = rnaString + "G" if letter == "G": rnaString = rnaString + "C" # the variable in the for loop is a representative of the index for b in range(0,len(rnaString), 3): codon = rnaString[b:b+3] print(codon) if codon == ("GCA" or codon == "GCC" or codon == "GCG" or codon =="GCU"): rnaString = rnaString + "A" if codon == ("UGC" or codon == "UGU"): rnaString = rnaString + "C" if codon == ("GAC" or codon == "GAU"): rnaString = rnaString + "D" if codon == ("GAA" or codon == "GAG"): rnaString = rnaString + "E" if codon == ("UUC" or codon == "UUU"): rnaString == rnaString + "F" if codon == ("GGA" or codon == "GGC" or codon == "GGG" or codon == "GGU"): rnaString = rnaString + "G" if codon == ("CAC" or codon == "CAU"): rnaString = rnaString + "H" if codon == ("AUA" or codon == "AUC" or codon == "AUU"): rnaString = rnaString + "I" if codon == ("AAA" or codon == "AAG"): rnaString = rnaString + "K" if codon == ("UUA" or codon == "UUG" or codon == "CUA" or codon == "CUC" or codon == "CUG" or codon =="CUU"): rnaString = rnaString + "L" if codon == ("AUG"): rnastring = rnaString + "M" if codon == ("AAC" or codon == "AAU"): rnaString = rnaString + "N" if codon == ("CCA" or codon == "CCC" or codon == "CCG" or codon == "CCU"): rnaString = rnaString + "P" if codon == ("CAA" or codon == "CAG"): rnaString = rnaString + "Q" if codon == ("AGA" or codon == "AGG" or codon == "CGA" or codon == "CGC" or codon == "CGG" or codon == "CGU"): rnaString = rnaString + "R" if codon == ("AGC" or codon == "AGU" or codon == "UCA" or codon == "UCC" or codon == "UCG" or codon == "UCU"): rnaString = rnaString + "S" if codon == ("ACA" or codon == "ACC" or codon == "ACG" or codon == "ACU"): rnaString = rnaString + "T" if codon == ("GUA" or codon == "GUC" or codon == "GUG" or codon == "GUU"): rnaString = rnaString + "V" if codon == ("UGG"): rnaString = rnaString + "W" if codon == ("UAC" or codon == "UAU"): rnaString = rnaString + "Y"

Portfolio

Excited to share my project: my personal portfolio website! 🚀 I've poured my creativity and skills into designing this platform to showcase my work and experiences. Explore my journey, see my projects, and connect with me for exciting opportunities. Visit my site by using below URL and let's connect!

https://github.com/Krupavaram-Bhupathi/Portfolio

Print a number from 1 to 1000 as a word Python

Code for printing a number from 1 to 1000 as a word in python.

import math names={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten", 11:"eleven",12:"twelve", 13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen",17:"seventeen",18:"eighteen",19:"nineteen",100:"hundred",1000:"thousand",20:"twenty",30:"thirty",40:"fourty",50:"fifty",60:"sixty",70:"seventy",80:"eighty",90:"ninety",200:"twohundred",300:"threehundred",400:"fourhundred",500:"fivehundred",600:"sixhundred",700:"sevenhundred",800:"eighthundred",900:"ninehundred",} num = input("Number between 1 and 1000: ") num = int(num) if num<=1000: if num in names: z=names.get(num) print(z) elif num<=99: m = num % 10 n = num - m m = names.get(m) n = names.get(n) result = n + m print(result) else: x=num%10 def rounddown(p): return int(math.floor(p/100.0)) * 100 h = rounddown(num) u = num - h - x x = names.get(x) h = names.get(h) u = names.get(u) if x is None: print(h+" "+u) else: print(h+" "+u+" "+x) else: print("Wrong input")
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