IFSC 30003 HW8 Due by M Oct. 26, 2026
Instructions:
Email your assignment to CPSI20023@gmail.com.
Note: When writing something by hand on a piece of paper, if using AI to help, be sure to
try to write each sentence or similar sized idea without looking at the screen.
This will enable you to understand the passage,
whereas if someone copies from the screen word for word,
then they are not learning much and then it becomes more of a time sink than a learning experience.
1. Work out this problem on pencil and paper, and hand in a photo of the paper.
a. List all the numbers from zero to twenty in
decimal (base 10) in a line across the top of the paper.
List the same numbers in hexadecimal right under that.
List the same numbers in binary under that.
b. What is the decimal system (base 10) number 85 in hexadecimal (base
16)? Work it out with pencil on paper, right under the answer to part a.
c. What is the decimal system (base 10) number 85 in binary (base 2)?
Work it out on the same sheet of paper.
2. Write a minimalist web page containing the tag
<body bgcolor="#6789ab">.
Its rather dull bluish (to me) color consists of
* 6716, written in JavaScript as 0x67 (= 103 in base 10)
brightness units of red light out of a possible maximum brightness of
25510 = 10016 = 0x100 brightness units
* 0x89 units of green light
* 0xab (= 17110) units of blue light
Change the color. Explain (as a <p> in the web page) how an HTML
color specification like "#6789ab” expresses an RBG specification
stating the amount of red, green and blue light to be mixed together.
Hand in a screen shot.
3. a. What is the value of pi, as estimated by JavaScript? Write down the
code and result using pencil and paper.
b. In JavaScript, calculate and alert() the price $0.99 + 7% sales tax.
Write out the code by hand on the same sheet of paper and explain how
it works, in your own words of course.
c. Suppose you need a random integer from 2 to 7. Give a JavaScript
expression that produces such a number. Explain exactly how it works.
You can use AI to help, but try to think it through and understand it
before you explain it. Write each sentence without looking at the screen
in the middle of the sentence, to enable you to understand what you mean.
d. Hand in a photo of the paper.
4. In the previous HW, question 3 was the following:
"3. Take a program that you created using AI in a previous HW, such as
the most recent HW (or another one). Make changes to it. Note that
some changes are easier to make successfully than others. Explain in
detail: what did you learn about using AI to make changes to an
existing AI-written program?"
For this HW, improve that program by colorizing it in various ways.
While you can use AI to help by making suggestions, do the actual edits
of the source code yourself.
5. Work on the game at
https://dberleant.github.io/IFSC3300/HW7c-bubblegame-numberscolors.html.
Hand in a screen shot at the end.