CSCI 101: Intro to Computer Science

CSCI 101: Intro to Computer Science (25 points) Design an HTML + JavaScript code for solving quadratic equations a·x2 + b·x + c = 0. The user enters the coefficients a, b, and c, and clicks the œSolve it button. The computer should display the solutions x1 and x2. These numbers can be computed according to the following formulas: Your Project has to have a layout similar to the one shown below. Solver of quadratic equations a·x2 + b·x + c = 0 a = b = c = x1= x2= Name your HTML file hw4_1.html (25 points) Modify the clock script designed in class to display time not in the military form, but in the AM/PM form. Leave only hours and minutes to be displayed (so, no seconds). For example, œ8:34 PM should be displayed instead of œ20:34³. Name your HTML file hw4_2.html (25 points) Modify the stopwatch script designed in class to count minutes, seconds, and milliseconds. For example, œ1:02:5³ should be displayed instead of œ62.5. Name your HTML file hw4_3.html (25 points) Design an HTML + JavaScript script that randomly selects and sets up the background color of the document. The background color should be chosen out of 10 colors of your choice stored in an array of colors. The background color has to be changed each time the document is loaded by using the onload event handler. Name your HTML file hw4_4.html

Posted in Uncategorized