can uh explain maths.random for cities
math.random can have any value like 100 so how does it work??
Random function
Hey @Naivedh
We have a total of 10 city names we can use
So to randomly pick the number of nodes that will be there in the graph we do
Math.floor(Math.random()*8+2 )
So this way we get a random integer between 2 and 10 which is our number of nodes in graph
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.