From f78c1cfd8043407c7f9a7b57d1965ba42d4e7898 Mon Sep 17 00:00:00 2001 From: TheBigH50 Date: Wed, 11 Jan 2023 13:53:51 -0600 Subject: [PATCH 1/3] change exe5 n variable to end, swap start and end, set end to 100-1000 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f913f0e..6737b1a 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ We already completed the FIZZBUZZ challenge. Now repeat the logic for the FIZZBU ```js let fizzDivisor = Math.round(Math.random() * (10 - 1) + 1); let buzzDivisor = Math.round(Math.random() * (10 - 1) + 1); -let n = Math.round(Math.random() * (1000 - 1) + 1); let start = Math.round(Math.random() * (10 - 1) + 1); +let end = Math.round(Math.random() * (1000 - 100) + 100); ``` 2. Re-implement exercise 2, but use `start` as the initial value for `i`, `n` as the range limit in `i <= n`, and `fizzDivisor` and `buzzDivisor` as the dependent values for determining "FIZZ" and "BUZZ" print messages. From b9529da3afddf0a0b695568e75c09e35495c3e2a Mon Sep 17 00:00:00 2001 From: TheBigH50 Date: Wed, 11 Jan 2023 13:56:51 -0600 Subject: [PATCH 2/3] insert comments about 4 math.random in exe5 to match portal --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6737b1a..0d277b2 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,10 @@ We already completed the FIZZBUZZ challenge. Now repeat the logic for the FIZZBU 1. Start with the following code: ```js -let fizzDivisor = Math.round(Math.random() * (10 - 1) + 1); -let buzzDivisor = Math.round(Math.random() * (10 - 1) + 1); -let start = Math.round(Math.random() * (10 - 1) + 1); -let end = Math.round(Math.random() * (1000 - 100) + 100); +let fizzDivisor = Math.round(Math.random() * (10 - 1) + 1); // creates a random number between 1 and 10 +let buzzDivisor = Math.round(Math.random() * (10 - 1) + 1); // creates a random number between 1 and 10 +let start = Math.round(Math.random() * (10 - 1) + 1); // creates a random number between 1 and 10 +let end = Math.round(Math.random() * (1000 - 100) + 100); // creates a random number between 100 and 1000 ``` 2. Re-implement exercise 2, but use `start` as the initial value for `i`, `n` as the range limit in `i <= n`, and `fizzDivisor` and `buzzDivisor` as the dependent values for determining "FIZZ" and "BUZZ" print messages. From 0e7f5e8b5ab4368f32e6c2b01725a9f112dc24fd Mon Sep 17 00:00:00 2001 From: TheBigH50 Date: Wed, 11 Jan 2023 13:57:24 -0600 Subject: [PATCH 3/3] change step 2 variables from n to end --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d277b2..6314de1 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ let start = Math.round(Math.random() * (10 - 1) + 1); // creates a random number let end = Math.round(Math.random() * (1000 - 100) + 100); // creates a random number between 100 and 1000 ``` -2. Re-implement exercise 2, but use `start` as the initial value for `i`, `n` as the range limit in `i <= n`, and `fizzDivisor` and `buzzDivisor` as the dependent values for determining "FIZZ" and "BUZZ" print messages. +2. Re-implement exercise 2, but use `start` as the initial value for `i`, `end` as the range limit in `i <= end`, and `fizzDivisor` and `buzzDivisor` as the dependent values for determining "FIZZ" and "BUZZ" print messages. ---