Write examples 3-4 (p. 21) and 3-17 (p. 33) from
Make: Getting Started with p5.js P5_ex_3_4.PNGP5_ex_3_17.PNG
Design a page like that seen below. It should have a text input that allows the user to enter the amount of a
restaurant bill. It should have a drop-down select that allows the user to choose the percentage tip he/she would
like to give. It should have a button which when clicked calculates the amount to pay
[amount=bill*(1+percentage) where the percentage is in a decimal format .20 as opposed to 20%].
Chrome: Right click on page, choose Inspect, click on Console tab Firefox: (If you don't have a menu, right click near the top and choose Menu Bar.) On the menu, choose
Tools/Web Developer/Web Console, click on the JS tab IE On the menu go to Tools/F12 Developer Tools
Homage_2.zip uses p5.js's random() method to color the
squares randomly
Homage_2_a.zip almost the same as above but uses JavaScript's
Math.random() and Math.floor() methods.
WeeklySalary.html Wrote in class. User enters number for hourly wage and
number of hours worked and the weekly salary is calculated including time-and-a-half for hours over 40. We also cleared the
result if the user typed a new number for wage (the keydown event) or used the up-down arrows to change the wage
(the change event).