''' Alan Garvey rnatest.py A program to test your dna2rna function on a single example. This assumes that the fasta file you input has a DNA example followed by the equivalent RNA example. ''' from readfasta import readfasta from dna2rna import dna2rna def rnatest(): # read in the dna and rna from a fasta file # we assume there is exactly one sequence in the fasta file filename = input("Please enter the fasta filename: ") info = readfasta(filename) dnaseq = info[0][2] correctrnaseq = info[1][2] # print the results print('The correct RNA sequence is:') print(correctrnaseq) print('\nYour RNA sequence is:') print(dna2rna(dnaseq)) if correctrnaseq == dna2rna(dnaseq): print("Yay. They are equal.") else: print("Better luck next time.")