From 0fc80621fb857d33697f583a04aaae3353cdb470 Mon Sep 17 00:00:00 2001 From: Harshith Kumar <186480203+Harshithk951@users.noreply.github.com> Date: Mon, 16 Mar 2026 00:34:52 +0530 Subject: [PATCH] fix: add missing test case and fix double semicolon in screaming snake case challenge (#66458) --- .../69272dcf1c24b44fd79137c3.md | 8 +++++++- .../69272dcf1c24b44fd79137c3.md | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/69272dcf1c24b44fd79137c3.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/69272dcf1c24b44fd79137c3.md index d72e73541fd..09f0bb54584 100644 --- a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/69272dcf1c24b44fd79137c3.md +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/69272dcf1c24b44fd79137c3.md @@ -55,6 +55,12 @@ assert.equal(toScreamingSnakeCase("user-address"), "USER_ADDRESS"); assert.equal(toScreamingSnakeCase("username"), "USERNAME"); ``` +`toScreamingSnakeCase("my_variable_name")` should return `"MY_VARIABLE_NAME"`. + +```js +assert.equal(toScreamingSnakeCase("my_variable_name"), "MY_VARIABLE_NAME"); +``` + # --seed-- ## --seed-contents-- @@ -73,6 +79,6 @@ function toScreamingSnakeCase(variableName) { let temp = variableName.replace(/[-_]+/g, ' '); temp = temp.replace(/([a-z0-9])([A-Z])/g, '$1 $2'); const words = temp.trim().split(/\s+/); - return words.join('_').toUpperCase();; + return words.join('_').toUpperCase(); } ``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/69272dcf1c24b44fd79137c3.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/69272dcf1c24b44fd79137c3.md index fd252729f8d..848015ff82f 100644 --- a/curriculum/challenges/english/blocks/daily-coding-challenges-python/69272dcf1c24b44fd79137c3.md +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/69272dcf1c24b44fd79137c3.md @@ -70,6 +70,15 @@ TestCase().assertEqual(to_screaming_snake_case("username"), "USERNAME")`) }}) ``` +`to_screaming_snake_case("my_variable_name")` should return `"MY_VARIABLE_NAME"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(to_screaming_snake_case("my_variable_name"), "MY_VARIABLE_NAME")`) +}}) +``` + # --seed-- ## --seed-contents--