Initial commit
Test / gate (push) Failing after 19m0s

This commit is contained in:
alexm committed 2026-11-12 22:23:54 -05:00
commit 401084bab3
265 files changed
+69224

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
# Generated by Programming+ from pseudo. Not reviewed for Mojo best practices.
# How many times each base appears in T.
def tally_bases(t: String) raises -> Dict[String, Int]:
var tally = Dict[String, Int]()
var b: String
for i in range(t.count_codepoints()):
b = String(t[codepoint=i])
if b in tally:
tally[b] = tally[b] + 1
else:
tally[b] = 1 # first sighting of this base
return tally.copy()
def main() raises:
print(tally_bases("GATTACA"))