DNA to RNA
In bioinformatics, a DNA strand is often converted into a matching RNA strand using fixed character pairs. The function to_rna receives dna_strand and replaces each character by these rules: G becomes C, C becomes G, T becomes A, and A becomes U. Keep the original order of the characters.
Примеры
Ввод
"G"Вывод
"C"Ввод
"C"Вывод
"G"Ввод
"T"Вывод
"A"Нужно реализовать
def to_rna(dna_strand: str) -> str:
Теги
stringsdict
Entre para ver seu histórico de envios
EntrarEntre para usar o AI Mentor
EntrarVisible tests
1
Input
"G"Expected
"C"2
Input
"C"Expected
"G"3
Input
"T"Expected
"A"4
Input
"A"Expected
"U"5
Input
"ACGTGGTCTTAA"Expected
"UGCACCAGAAUU"6
Input
""Expected
""Focus radio
Paused · SomaFM · Fluid