[beta] Generate Random Whole Numbers within a Range - failing tests
See original GitHub issueChallenge generate-random-whole-numbers-within-a-range has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
Another challenge which fails tests if coming from previous challenge but passes if I exit the challenge and come back in directly from the Map.
Notice in the screenshot the two variables it says are not defined, even though they do not exist in my code.
// Example
function ourRandomRange(ourMin, ourMax) {
return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;
}
ourRandomRange(1, 9);
// Only change code below this line.
function randomRange(myMin, myMax) {
return Math.floor(Math.random() * (myMax - myMin + 1)) + myMin;// Change this line
}
// Change these values to test your function
var myRandom = randomRange(5, 15);
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Generating random numbers - Program Evaluation
Beta distributions are neat because they naturally only range between 0 and 1—they're perfect for things like percentages or proportions or or ...
Read more >Generate Random Whole Numbers within a Range - Guide
Generate Random Whole Numbers within a Range Hints Hint 1 randomRange should use both myMax and myMin, and return a random number in...
Read more >Generate Random Whole Numbers within a Range - GitHub
Create a function called randomRange that takes a range myMin and myMax and returns a random number that's greater than or equal to...
Read more >How to test random numbers? - Stack Overflow
With most tests you can supply a large file of random numbers (integer or floating point) and run various tests on that sample...
Read more >Generate random numbers following a distribution within an ...
(I am working in R.) I know the function rnorm(n,mean,sd) will generate random numbers following normal distribution,but how to set the interval ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You experienced exactly what we did. I do not know how the site runs the challengeSeed / tail / tests. Would love to know for future reference.
I can’t reproduce this issue on the latest beta, neither when coming from the previous challenge or after reload, so I’m closing this. If anybody does run into this issue again or can still reproduce this, please comment to let us know and we’ll reopen.
Happy coding!