diff --git a/curriculum/challenges/english/blocks/lecture-numbers-and-mathematical-operations/67fe859e9d3b3635197781c8.md b/curriculum/challenges/english/blocks/lecture-numbers-and-mathematical-operations/67fe859e9d3b3635197781c8.md index 36515853649..06d2ecf07e5 100644 --- a/curriculum/challenges/english/blocks/lecture-numbers-and-mathematical-operations/67fe859e9d3b3635197781c8.md +++ b/curriculum/challenges/english/blocks/lecture-numbers-and-mathematical-operations/67fe859e9d3b3635197781c8.md @@ -142,8 +142,8 @@ my_float_2 = 12.0 mod_ints = my_int_1 % my_int_2 mod_floats = my_float_2 % my_float_1 -print('Integer Modulus:', mod_ints) # Integer Modulus: 8 -print('Float Modulus:', mod_floats) # Float Modulus: 1.1999999999999993 +print('Integer Modulo:', mod_ints) # Integer Modulo: 8 +print('Float Modulo:', mod_floats) # Float Modulo: 1.1999999999999993 ``` Floor division divides two numbers and returns the greatest integer less than or equal to the result. This is done with the double forward slash operator (`//`): diff --git a/curriculum/challenges/english/blocks/lecture-numbers-and-mathematical-operations/6839b3295323f563efc68f5c.md b/curriculum/challenges/english/blocks/lecture-numbers-and-mathematical-operations/6839b3295323f563efc68f5c.md index 4644847e0f6..c9d09a001ff 100644 --- a/curriculum/challenges/english/blocks/lecture-numbers-and-mathematical-operations/6839b3295323f563efc68f5c.md +++ b/curriculum/challenges/english/blocks/lecture-numbers-and-mathematical-operations/6839b3295323f563efc68f5c.md @@ -84,7 +84,7 @@ total_pages //= 5 print(total_pages) # 4 ``` -- The modulus assignment operator (`%=`) computes the remainder of the left variable divided by the right and stores it back in the left variable: +- The modulo assignment operator (`%=`) computes the remainder of the left variable divided by the right and stores it back in the left variable: ```python diff --git a/curriculum/challenges/english/blocks/lecture-working-with-higher-order-functions-and-callbacks/673362b3f763ae1e38e17df7.md b/curriculum/challenges/english/blocks/lecture-working-with-higher-order-functions-and-callbacks/673362b3f763ae1e38e17df7.md index c4353ebe1ef..b2d98536451 100644 --- a/curriculum/challenges/english/blocks/lecture-working-with-higher-order-functions-and-callbacks/673362b3f763ae1e38e17df7.md +++ b/curriculum/challenges/english/blocks/lecture-working-with-higher-order-functions-and-callbacks/673362b3f763ae1e38e17df7.md @@ -22,7 +22,7 @@ console.log(evenNumbers); // [2, 4, 6, 8, 10] ::: -In this example, the `filter` method applies a callback function to each element of the `numbers` array. The callback checks whether each number is even using the modulo operator (`%`). +In this example, the `filter` method applies a callback function to each element of the `numbers` array. The callback checks whether each number is even using the remainder operator (`%`). If the number is even, the function returns `true`, and that number is included in the new array. If it's odd, the function returns `false`, and that number is excluded. diff --git a/curriculum/challenges/english/blocks/lecture-working-with-operator-behavior/673271b4213033d9b661c70e.md b/curriculum/challenges/english/blocks/lecture-working-with-operator-behavior/673271b4213033d9b661c70e.md index 621b9510467..e0514913fef 100644 --- a/curriculum/challenges/english/blocks/lecture-working-with-operator-behavior/673271b4213033d9b661c70e.md +++ b/curriculum/challenges/english/blocks/lecture-working-with-operator-behavior/673271b4213033d9b661c70e.md @@ -150,7 +150,7 @@ Think about how to combine mathematical operations and reassignment. ## --text-- -What does the `modulus` assignment operator (`%=`) do in JavaScript? +What does the remainder assignment operator (`%=`) do in JavaScript? ## --answers-- @@ -158,7 +158,7 @@ Divides a variable by the specified number and assigns the quotient to the varia ### --feedback-- -Think about how the `modulus` operator works in a normal arithmetic operation. +Think about how the remainder operator works in a normal arithmetic operation. --- @@ -166,7 +166,7 @@ Multiplies a variable by the specified number and assigns the product to the var ### --feedback-- -Think about how the `modulus` operator works in a normal arithmetic operation. +Think about how the remainder operator works in a normal arithmetic operation. --- @@ -178,7 +178,7 @@ Adds the remainder of a division to the variable. ### --feedback-- -Think about how the `modulus` operator works in a normal arithmetic operation. +Think about how the remainder operator works in a normal arithmetic operation. ## --video-solution-- diff --git a/curriculum/challenges/english/blocks/review-bash-scripting/6724e417419c2f211bb41bfc.md b/curriculum/challenges/english/blocks/review-bash-scripting/6724e417419c2f211bb41bfc.md index abf8afd3092..d4c899c97d6 100644 --- a/curriculum/challenges/english/blocks/review-bash-scripting/6724e417419c2f211bb41bfc.md +++ b/curriculum/challenges/english/blocks/review-bash-scripting/6724e417419c2f211bb41bfc.md @@ -260,7 +260,7 @@ dashedName: review-bash-scripting - `-` (subtraction): Subtract second number from first - `*` (multiplication): Multiply two numbers - `/` (division): Divide first number by second (integer division) - - `%` (modulus): Remainder after division + - `%` (modulo): Remainder after division - `**` (exponentiation): Raise first number to power of second ```bash @@ -277,7 +277,7 @@ dashedName: review-bash-scripting - `-=` (subtract and assign): Subtract value from variable - `*=` (multiply and assign): Multiply variable by value - `/=` (divide and assign): Divide variable by value - - `%=` (modulus and assign): Set variable to remainder + - `%=` (modulo and assign): Set variable to remainder ```bash (( counter = 0 )) @@ -558,7 +558,7 @@ for server in "${servers[@]}" - **Random numbers**: Generate random values using the `$RANDOM` variable. - `$RANDOM` generates numbers between 0 and 32767 - - Use modulus operator to limit range: `$RANDOM % 75` + - Use modulo operator to limit range: `$RANDOM % 75` - Add 1 to avoid zero: `$(( RANDOM % 75 + 1 ))` - Must use `$(( ... ))` syntax for calculations with `$RANDOM` @@ -580,7 +580,7 @@ for server in "${servers[@]}" echo ${RESPONSES[$N]} ``` -- **Modulus operator**: Use `%` to get the remainder of division operations. +- **Modulo operator**: Use `%` to get the remainder of division operations. - Essential for limiting random number ranges - Works with `$RANDOM` to create bounded random values - `RANDOM % n` gives numbers from 0 to n-1 diff --git a/curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md b/curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md index 0b05963cb78..ac2eaae095d 100644 --- a/curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md +++ b/curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md @@ -417,7 +417,7 @@ float_1 = 5.4 print(int_1 + float_1) # 61.4 ``` -- **Modulus Operator (`%`)**: This returns the remainder when a number is divided by another number: +- **Modulo Operator (`%`)**: This returns the remainder when a number is divided by another number: ```py int_1 = 56 @@ -544,7 +544,7 @@ total_pages //= 5 print(total_pages) # 4 -# Modulus assignment +# Modulo assignment bits = 35 bits %= 2 diff --git a/curriculum/challenges/english/blocks/review-python/67f39e391c9b373069def02c.md b/curriculum/challenges/english/blocks/review-python/67f39e391c9b373069def02c.md index 4eefdd1aff8..dbb281880c3 100644 --- a/curriculum/challenges/english/blocks/review-python/67f39e391c9b373069def02c.md +++ b/curriculum/challenges/english/blocks/review-python/67f39e391c9b373069def02c.md @@ -417,7 +417,7 @@ float_1 = 5.4 print(int_1 + float_1) # 61.4 ``` -- **Modulus Operator (`%`)**: This returns the remainder when a number is divided by another number: +- **Modulo Operator (`%`)**: This returns the remainder when a number is divided by another number: ```py int_1 = 56 @@ -544,7 +544,7 @@ total_pages //= 5 print(total_pages) # 4 -# Modulus assignment +# Modulo assignment bits = 35 bits %= 2 diff --git a/curriculum/challenges/english/blocks/review-relational-databases/6724e5e321bce627736ea145.md b/curriculum/challenges/english/blocks/review-relational-databases/6724e5e321bce627736ea145.md index f8f5035ec0b..7eff5fa692a 100644 --- a/curriculum/challenges/english/blocks/review-relational-databases/6724e5e321bce627736ea145.md +++ b/curriculum/challenges/english/blocks/review-relational-databases/6724e5e321bce627736ea145.md @@ -706,7 +706,7 @@ CREATE DATABASE database_name; - `-` (subtraction): Subtract second number from first - `*` (multiplication): Multiply two numbers - `/` (division): Divide first number by second (integer division) - - `%` (modulus): Remainder after division + - `%` (modulo): Remainder after division - `**` (exponentiation): Raise first number to power of second ```bash @@ -723,7 +723,7 @@ CREATE DATABASE database_name; - `-=` (subtract and assign): Subtract value from variable - `*=` (multiply and assign): Multiply variable by value - `/=` (divide and assign): Divide variable by value - - `%=` (modulus and assign): Set variable to remainder + - `%=` (modulo and assign): Set variable to remainder ```bash (( counter = 0 )) @@ -1005,7 +1005,7 @@ for server in "${servers[@]}" - **Random numbers**: Generate random values using the `$RANDOM` variable. - `$RANDOM` generates numbers between 0 and 32767 - - Use modulus operator to limit range: `$RANDOM % 75` + - Use modulo operator to limit range: `$RANDOM % 75` - Add 1 to avoid zero: `$(( RANDOM % 75 + 1 ))` - Must use `$(( ... ))` syntax for calculations with `$RANDOM` @@ -1027,7 +1027,7 @@ for server in "${servers[@]}" echo ${RESPONSES[$N]} ``` -- **Modulus operator**: Use `%` to get the remainder of division operations. +- **Modulo operator**: Use `%` to get the remainder of division operations. - Essential for limiting random number ranges - Works with `$RANDOM` to create bounded random values - `RANDOM % n` gives numbers from 0 to n-1