+ 28

RANDOM CHALLENGE

Create a function which takes a limit as an argument and returns the random value between this two limits.. create this function without using default random library.. for example : input : random(2,10); random(2,10); random(2,10); random(2,10); output : 7 5 3 9 #Happy_Coding...

19th Dec 2017, 4:24 AM
Nikky Amresh
Nikky Amresh - avatar
29 Respostas
+ 9
Here's mine. using lcg formula . plus a period test https://code.sololearn.com/Wq8uSyoVW3Wm/?ref=app
21st Dec 2017, 1:57 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
19th Dec 2017, 8:28 PM
LukArToDo
LukArToDo - avatar
+ 12
@Brian not so effective I tried with rand(1,6) rand(1,6) it returns... 2 2 šŸ™
19th Dec 2017, 7:20 AM
Nikky Amresh
Nikky Amresh - avatar
+ 12
19th Dec 2017, 9:15 PM
David Akhihiero
David Akhihiero - avatar
+ 11
@hareesh menikonda Yeah you can(<a href="Next_page.htm"><img src="img.png" /></a>)
19th Dec 2017, 1:10 PM
Nikky Amresh
Nikky Amresh - avatar
+ 10
@hareesh menikonda With anchor tag (<a href="Next_page.htm">click me</a>) It seems you need to complete it first ..... It's a basic topic of html.. šŸ˜ https://www.sololearn.com/Course/HTML
19th Dec 2017, 1:04 PM
Nikky Amresh
Nikky Amresh - avatar
+ 10
@Prashant Kumar {Intermediate} šŸ˜Š //Without using default random library
19th Dec 2017, 2:09 PM
Nikky Amresh
Nikky Amresh - avatar
+ 9
@hareesh menikonda Brother it's depends on application type.. yeah WEBSITES are surely dependent on html...
19th Dec 2017, 1:01 PM
Nikky Amresh
Nikky Amresh - avatar
+ 9
its impossible i think i need to learn psedurandom number generator after googling .. šŸ˜¢ i giveup
19th Dec 2017, 2:56 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 9
I have made a random template class in C++. It can return char, float, int and more. It takes 2 arguments: first is the minimum number, second is the range https://code.sololearn.com/c69x0TgNRMpo/?ref=app
27th Jan 2018, 7:17 AM
Thor Westergren
Thor Westergren - avatar
+ 8
@hareesh menikonda Ask your questions here(on sololearn)... We'll surely try to clear your doubts... ā˜ŗļø
19th Dec 2017, 12:58 PM
Nikky Amresh
Nikky Amresh - avatar
+ 8
ooh i didnt read question properly šŸ˜œ
19th Dec 2017, 2:21 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 7
Yeah @Brian... Without using random library
19th Dec 2017, 4:48 AM
Nikky Amresh
Nikky Amresh - avatar
+ 7
@brian sure good idea
19th Dec 2017, 7:03 AM
Oma Falk
Oma Falk - avatar
+ 7
@hareesh menikonda Here we go https://www.sololearn.com/Course/HTML
19th Dec 2017, 12:55 PM
Nikky Amresh
Nikky Amresh - avatar
+ 7
https://code.sololearn.com/W2d1vPDF9PT2/?ref=app just a beta version of Math.random() in js it dont works 100% same as Math.random() function
21st Dec 2017, 2:20 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 6
//javascript //too easy challenge just a litle maths skill //i have made a drafted code šŸ˜Š function random(a,b){ return Math.random()*(a-b)+b; } random(4,-4); //generates a random value from 4 to -4
19th Dec 2017, 1:58 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 6
Here is my try generates random number between a to b including b but not a. https://code.sololearn.com/cfaopRvp8wBf/?ref=app
20th Dec 2017, 9:12 AM
RZK 022
RZK 022 - avatar
+ 6
https://code.sololearn.com/cIDNWZnu2wom/?ref=app
27th Jan 2018, 2:43 PM
VaiBhav
VaiBhav - avatar
19th Dec 2017, 5:27 AM
į Œį ŒCode X
į Œį ŒCode X - avatar