repl.it
@ArjunSS1/

Biology Project

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
import os#UCAG
dicter = {
  "UUU":'Phenylalanine',
  "UUC":'Phenylalanine',
  "UUA":"Leucine",
  "UUG":"Leucine",
  
  "UCU":"Serine",
  "UCC":"Serine",
  "UCA":"Serine",
  "UCG":"Serine",

  "UAU":"Tyrosine",
  "UAC":"Tyrosine",
  "UAA":"Stop",
  "UAG":"Stop",

  "UGU":"Cysteine",
  "UGC":"Cysteine",
  "UGA":"Stop",
  "UGG":"Tryptophan",

  "CUU":"Leucine",
  "CUC":"Leucine",
  "CUA":"Leucine",
  "CUG":"Leucine",

  "CCU":"Proline",
  "CCC":"Proline",
  "CCA":"Proline",
  "CCG":"Proline",

  "CAU":"Histidine",
  "CAC":"Histidine",
  "CAA":"Glutamine",
  "CAG":"Glutamine",

  "CGU":"Arginine",
  "CGC":"Arginine",
  "CGA":"Arginine",
  "CGG":"Arginine",

  "AUU":"Isoleucine",
  "AUC":"Isoleucine",
  "AUA":"Isoleucine",
  "AUG":"Methionine",

  "ACU":"Threonine",
  "ACC":"Threonine",
  "ACA":"Threonine",
  "ACG":"Threonine",

  "AAU":"Asparagine",
  "AAC":"Asparagine",
  "AAA":"Lysine",
  "AAG":"Lysine",

  "AGU":"Serine",
  "AGC":"Serine",
  "AGA":"Arginine",
  "AGG":"Arginine",

  "GUU":"Valine",
  "GUC":"Valine",
  "GUA":"Valine",
  "GUG":"Valine",

  "GCU":"Alanine",
  "GCC":"Alanine",
  "GCA":"Alanine",
  "GCG":"Alanine",

  "GAU":"Aspartic Acid",
  "GAC":"Aspartic Acid",
  "GAA":"Glutamic Acid",
  "GAG":"Glutamic Acid",

  "GGU":"Glycine",
  "GGC":"Glycine",
  "GGA":"Glycine",
  "GGG":"Glycine"
}
inv_dicter = {v: k for k ,v in dicter.items()}
banana_split = {
  "UAC": "bowl",
  "AAG": "banana",
  "ACU": "stop",
  "AGU": "chocolate ice cream",
  "UCG": "chocolate ice cream",
  "AGC" :"chocolate ice cream",
  "GAA" :"vanilla ice cream",
  "AAC":"vanilla ice cream",
  "AAU":"vanilla ice cream",
  "CCG": "strawberry ice cream",
  "CCU": "strawberry ice cream",
  "CCG" : "strawberry ice cream",
  "AUA" : "hot fudge",
  "AUG" : "hot fudge",
  "GCU": "caramel Syrup",
  "UCU":"caramel Syrup",
  "GCA": "caramel Syrup",
  "UGG":"strawberry Syrup",
  "UGA":"strawberry Syrup",
  "UGU":"strawberry Syrup",
  "CGA":"cherry",
  "CGU": "cherry",
  "CGG" : "cherry",
  "GGG" : "walnuts",
  "GGU" : "walnuts",
  "GGC" : "walnuts",
  "UUC" : "sprinkles",
  "UUU" : "sprinkles",
  "CAG":"whip cream",
  "CAU":"whip cream",
  "CAA" : "whip Cream"
}
inv_banana_split = {v: k for k ,v in banana_split.items()}
def run():
  os.system('clear')
  try:
    x = int(input("Choose:\n1 - dna codons\n2  - banana split, exit to close\n>>> "))
  except:

    run()
  if x == 1:
    dicter_func()
  elif x == 2:
    banana_split_func()
  else:
    run()


def dicter_func():

  while True:
    os.system("clear")
    inputval = input("Enter:\n>>> ").upper().replace('T','U')
    if inputval == 'EXIT':
      run()
    try:
      result = dicter[inputval]
    except:
      try:
        result = inv_dicter[inputval]
      except:
        result = "Null"
    finally:
      print(result)
    continue_val = input("\nPress enter to continue")
def banana_split_func():
    
  while True:
    os.system("clear")
    inputval = input("Enter:\n>>> ")
    if inputval == 'exit':
      run()
    
    try:
      result = banana_split[inputval.upper().replace('T','U').replace('t','u')]
    except:
      try:
        result = inv_banana_split[inputval.lower()]
      except:
        result = "Null"
    finally:
      print(result)
    continue_val = input("\nPress enter to continue")
  #UCAG

run()
?