Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions RNATranscription/RNATranscription.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
using System;
using System.Text;
using System.Collections.Generic;

namespace RNATranscriptionModule
{
public static class RnaTranscription
{
static void Main(string[] args)
{}
static readonly IReadOnlyDictionary<char, char> TranslateTable = new Dictionary<char, char>
{
public static string ToRna(string nucleotide)
{
throw new NotImplementedException("You need to implement this function.");
}
['G'] = 'C',
['C'] = 'G',
['T'] = 'A',
['A'] = 'U',
};

public static string ToRna(string nucleotide){

StringBuilder sb = new StringBuilder(nucleotide);
for(int i=0;i<nucleotide.Length;i++){
sb[i] = TranslateTable[sb[i]];
}

return sb.ToString();

}

}

}