Making choices dna or rna iteration (solution)

Exercise
Output solution
  1. Use the function and a for loop
[1] "DNA"
[1] "RNA"
[1] "UNKNOWN"
[1] "RNA"
[1] "RNA"
  1. Use the function and sapply
                               ttgaatgccttacaactgatcattacacaggcggcatgaagcaaaaatatactgtgaaccaatgcaggcg 
                                                                                                "DNA" 
                               gauuauuccccacaaagggagugggauuaggagcugcaucauuuacaagagcagaauguuucaaaugcau 
                                                                                                "RNA" 
                                                       gaaagcaagaaaaggcaggcgaggaagggaagaagggggggaaacc 
                                                                                            "UNKNOWN" 
guuuccuacaguauuugaugagaaugagaguuuacuccuggaagauaauauuagaauguuuacaacugcaccugaucagguggauaaggaagaugaagacu 
                                                                                                "RNA" 
                      gauaaggaagaugaagacuuucaggaaucuaauaaaaugcacuccaugaauggauucauguaugggaaucagccggguc 
                                                                                                "RNA"