import time
#nucleotides="ATGC"
nucleotides="AATGCA"
nulength= len(nucleotides)
nucleostring=""
noofbase=0
inputbase= int(input("Enter the number of base: "))
while noofbase < inputbase:
rand=int(time.time_ns())
randomno=rand%nulength
nucleostring+=nucleotides[randomno]
noofbase+=1
print(nucleostring)
print("Forward: ")
print("DNA Seq")
if len(nucleostring)%3 == 0:
for i in range(0, len(nucleostring),3):
c= nucleostring[i:i+3]
print(c,end=' ')
Comments
Leave a comment