Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

DiceBoy

ID: 3601977 • Letter: D

Question

DTCC Wilhg Introduction Winite a web page that includes JavaScript to do the following: (Separate HTML, CSS and JavaScript into different files) of the 6 dice in 1 row like the following: (5 points) 1 Display the images 2. Then, simulate the rolling of the die for 900 times and produce the result similar to the following format: (10 points) Value | Theory | % Theory | Actual | % Actual | Diff 150 16.67 140 15.56 150 16.67 142 15.78 150 16.67 153 17.00 150 16.67 155 17.22 5 150 16.67 152 16.89 2 150 16.67 158 17.56 Summary 900 100.00 900100.00 36 %Diff 6.67 5.33 2.00 3.33 1.33 5.33 4.00 10 (Table 1: Result of throwing the die 900 times.) "Note: Diff is the absolute value between theoretical and actual values. % Diff is Diff/Theory). 3. Add a text box for the user to enter the number of times that the user wishes to rol the die and then updates the table accordingly. Limit the number between 600 and 6000 and it has to be a multiple of 6.(5 points) 4 5 points bonus to have dice placed at the first column of every row instead of the number. (Extra 5 points) What you need to do for your exam to be graded: 1. This page with your name written. 2. Create a folder called exam2 on Google drive and load you files there. In the meantime, update your personal web page so that this program can be run. 3. Finally, zip the files and submit it to BlackBoard.

Explanation / Answer

DiceBoy function getRandom(){ var RandomNumber1 = Math.floor(Math.random() * 6) + 1; var RandomNumber2 = Math.floor(Math.random() * 6) + 1; if(RandomNumber1 == 1) document.write(''); else if(RandomNumber1 == 2) document.write(''); else if(RandomNumber1 == 3) document.write(''); else if(RandomNumber1 == 4) document.write(''); else if(RandomNumber1 == 5) document.write(''); else var document.write(''); }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote