aboutsummaryrefslogtreecommitdiff
path: root/challenge-273/conor-hoekstra
diff options
context:
space:
mode:
authorConor Hoekstra <codereport@outlook.com>2024-07-10 11:58:41 -0400
committerConor Hoekstra <codereport@outlook.com>2024-07-10 11:58:41 -0400
commit2214844877d054829d3bcb2db6a0e99b5f0184fb (patch)
treed2eac86e61b3d3654d17ebe6d8459e64cf329095 /challenge-273/conor-hoekstra
parentf6319d73080f30f96184f1d1377c174750d7dc8b (diff)
downloadperlweeklychallenge-club-2214844877d054829d3bcb2db6a0e99b5f0184fb.tar.gz
perlweeklychallenge-club-2214844877d054829d3bcb2db6a0e99b5f0184fb.tar.bz2
perlweeklychallenge-club-2214844877d054829d3bcb2db6a0e99b5f0184fb.zip
:sparkles: Challenges 273 - 277 in BQN
Diffstat (limited to 'challenge-273/conor-hoekstra')
-rw-r--r--challenge-273/conor-hoekstra/ch-1.bqn14
-rw-r--r--challenge-273/conor-hoekstra/ch-2.bqn7
2 files changed, 21 insertions, 0 deletions
diff --git a/challenge-273/conor-hoekstra/ch-1.bqn b/challenge-273/conor-hoekstra/ch-1.bqn
new file mode 100644
index 0000000000..01c89548c5
--- /dev/null
+++ b/challenge-273/conor-hoekstra/ch-1.bqn
@@ -0,0 +1,14 @@
+# For up to date code:
+# https://github.com/codereport/bqn-code/blob/main/pwc/273-1.bqn
+
+⟨Round⟩ ⇐ •Import "../lib/math.bqn"
+
+Percentage ← (Round 100×+´÷≠)=
+
+# Tests
+•Show "perl" Percentage 'e' # 25
+•Show "java" Percentage 'a' # 50
+•Show "python" Percentage 'm' # 0
+•Show "ada" Percentage 'a' # 67
+•Show "ballerina" Percentage 'l' # 22
+•Show "analitik" Percentage 'k' # 13
diff --git a/challenge-273/conor-hoekstra/ch-2.bqn b/challenge-273/conor-hoekstra/ch-2.bqn
new file mode 100644
index 0000000000..d6b62b46a1
--- /dev/null
+++ b/challenge-273/conor-hoekstra/ch-2.bqn
@@ -0,0 +1,7 @@
+# For up to date code:
+# https://github.com/codereport/bqn-code/blob/main/pwc/273-2.bqn
+
+BAfterA ← (⌈´∧⌈`⊸≡)'b'=⊢
+
+# Tests
+•Show BAfterA ¨ "aabb"‿"abab"‿"aaa"‿"bbb" # ⟨ 1 0 0 1 ⟩