mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
fix(curriculum): adjust sentence in steps 2-14 in workshop-mathbot (#63912)
This commit is contained in:
parent
9339da9283
commit
73f74045ca
@ -9,14 +9,14 @@ dashedName: step-2
|
||||
|
||||
The next part of the workshop will review how the `Math.random()` method works.
|
||||
|
||||
Start by adding another `console.log()` that logs the string `"The Math.random() method returns a pseudo random number between 0 and less than 1."` to the console.
|
||||
Start by adding another `console.log()` that logs the string `"The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1."` to the console.
|
||||
|
||||
# --hints--
|
||||
|
||||
You should have a `console.log()` that logs the string `"The Math.random() method returns a pseudo random number between 0 and less than 1."`.
|
||||
You should have a `console.log()` that logs the string `"The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1."`.
|
||||
|
||||
```js
|
||||
assert.match(code, /console\.log\((`|'|")\s*The\s+Math\.random\(\)\s+method\s+returns\s+a\s+pseudo\s+random\s+number\s+between\s+0\s+and\s+less\s+than\s+1\.\1\)/);
|
||||
assert.match(code, /console\.log\((`|'|")\s*The\s+Math\.random\(\)\s+method\s+returns\s+a\s+pseudo\s+random\s+number\s+greater\s+than\s+or\s+equal\s+to\s+0\s+and\s+less\s+than\s+1\.\1\)/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@ -54,7 +54,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
@ -69,7 +69,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -61,7 +61,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -31,7 +31,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -60,7 +60,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -29,7 +29,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -62,7 +62,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -29,7 +29,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -82,7 +82,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -29,7 +29,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -78,7 +78,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
|
||||
@ -29,7 +29,7 @@ const greeting = `Hi there! My name is ${botName} and I am here to teach you abo
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");
|
||||
console.log("The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1.");
|
||||
|
||||
const randomNum = Math.random();
|
||||
console.log(randomNum);
|
||||
@ -82,7 +82,7 @@ const greeting = `Hi there! My name is ${botName} and I want to teach you about
|
||||
console.log(greeting);
|
||||
|
||||
console.log(
|
||||
"The Math.random() method returns a pseudo random number between 0 and less than 1."
|
||||
"The Math.random() method returns a pseudo random number greater than or equal to 0 and less than 1."
|
||||
);
|
||||
|
||||
const randomNum = Math.random();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user