0

The highest and minimum possible values

Please what’s the highest possible value produce here? Math.floor(Math.random() *101)

7th Sep 2022, 4:57 PM
DESMOND YEBOAH
DESMOND YEBOAH - avatar
8 Answers
+ 7
Write your code on the playground.
7th Sep 2022, 4:58 PM
Scientist
Scientist - avatar
+ 7
Look at 🧚Somya🌹 's answer. She explained very well.
7th Sep 2022, 5:38 PM
Scientist
Scientist - avatar
+ 5
DESMOND YEBOAH , what programing language are you talking about?
7th Sep 2022, 5:16 PM
Lothar
Lothar - avatar
+ 5
DESMOND YEBOAH the highest value will 100.
7th Sep 2022, 5:30 PM
Scientist
Scientist - avatar
+ 4
Math.random() It returns the random value from 0 to number-1 but with including Math.floor() you'll get integer value Where number be 1,5,100 any number Examples: Math.random() * 2 // it will return 0 to 1 Math.random() * 101 // it will return 0 to 100
7th Sep 2022, 5:19 PM
🧚Somya🌹
🧚Somya🌹 - avatar
+ 2
Javascript
7th Sep 2022, 5:28 PM
DESMOND YEBOAH
DESMOND YEBOAH - avatar
+ 1
How please?
7th Sep 2022, 5:34 PM
DESMOND YEBOAH
DESMOND YEBOAH - avatar
0
Is it because of this formula Math.floor(Math.random() * (high-low+1))+low ?
7th Sep 2022, 6:44 PM
DESMOND YEBOAH
DESMOND YEBOAH - avatar