My girlfriend needs help with a project that is due in 2 days and she asked me for help. I do not know javascrip very well, so can you guys please help me out? The project is:
PREPARE A PROGRAM IN JAVASCRIPT FOR THE FOLLOWING:
THE MATH.RANDOM ( ) FUNCTION CAN BE USED TO CREATE RANDOM NUMBERS, E.G., X=MATH.RANDOM ( ) WILL RESULT IN X HAVING A VALUE BETWEEN 0 AND 1 EXCLUDING 0 AND 1.
IN GENERAL THE FORMULA X = (MATH.RANDOM ( )*m) + n PRODUCES A RANDOM NUMBER BETWEEN n AND m*THE RANDOM NUMBER + n.
FOR EXAMPLE, IF THE n=2 AND m=3, THEN A RANDOM NUMBER BETWEEN 2 AND 5 IS PRODUCED (3*(0 TO 1) + 2=2 TO 5 NON INCLUSIVE).
BUILD A FORM THAT ALLOWS A USER TO SIMULATE TOSSING A DIE AN INPUT NUMBER OF TIMES WHERE THE USER PICKS THE NUMBER OF TIMES THAT THE DIE IS TOSSED, BETWEEN 10 AND 200, AND COUNT THE NUMBER OF TIMES A
1, 2, 3,4,5,6 APPEARS. REMEMBER A RANDOM NUMBER BETWEEN 1 AND 6 MUST BE CONTINUALLY GENERATED.
if anyone can help me out, i'd very much greatly appreciate it...Thank you
PREPARE A PROGRAM IN JAVASCRIPT FOR THE FOLLOWING:
THE MATH.RANDOM ( ) FUNCTION CAN BE USED TO CREATE RANDOM NUMBERS, E.G., X=MATH.RANDOM ( ) WILL RESULT IN X HAVING A VALUE BETWEEN 0 AND 1 EXCLUDING 0 AND 1.
IN GENERAL THE FORMULA X = (MATH.RANDOM ( )*m) + n PRODUCES A RANDOM NUMBER BETWEEN n AND m*THE RANDOM NUMBER + n.
FOR EXAMPLE, IF THE n=2 AND m=3, THEN A RANDOM NUMBER BETWEEN 2 AND 5 IS PRODUCED (3*(0 TO 1) + 2=2 TO 5 NON INCLUSIVE).
BUILD A FORM THAT ALLOWS A USER TO SIMULATE TOSSING A DIE AN INPUT NUMBER OF TIMES WHERE THE USER PICKS THE NUMBER OF TIMES THAT THE DIE IS TOSSED, BETWEEN 10 AND 200, AND COUNT THE NUMBER OF TIMES A
1, 2, 3,4,5,6 APPEARS. REMEMBER A RANDOM NUMBER BETWEEN 1 AND 6 MUST BE CONTINUALLY GENERATED.
if anyone can help me out, i'd very much greatly appreciate it...Thank you