Files
pplus-web/quarto/example/programs/count-base.lingo
T
2026-10-05 03:03:38 +00:00

8 lines
213 B
Plaintext

// CALL: COUNT_BASES('A', "GATTACA")
// EXPECT: COUNT_BASES returned 3
To count the B bases in T:
Start with Count at 0.
For each letter c of T:
If c is B, add 1 to Count.
The answer is Count.