Common Computer Science References
At the end of this lesson, you will be able to:
create a flowchart for your program
storyboards
difference between integers and floats
HTML
<input type="number" step="any" id="length-of-pyramid" placeholder="e.g. 3.2">
<input type="number" step=".01" id="hourly-rate" placeholder="e.g. 15">
step=".01" will allow 2 decimal places to be entered
JS
const length = parseFloat(document.getElementById("length-of-pyramid").value)
when you have a value that never changes, we call that a "constant"
the standard is to not only declare it as a constant, but also use all upper case
ex: const TAX_RATE = 0.13
a flowchart is just a sequence of steps to follow
we use them in programming to solve our problem BEFORE we start coding
each shape in a flowchart has meaning
the "main" thread of the program gets a flowchart
each function gets its own flowchart
you do not show the declaration of variables in a flowchart
if there is any math, you always show the math
give them a title, so we know what they are showing
the arrows show the flow of logic
we will be using Draw.io
DO NOT take a screenshot of the flowchart
always export as PNG and insert it
create a web page that will do the following:
that calculates the volume of a right rectangular pyramid
see screenshots below: ↓
ensure you now do a flowchart before you write the program
create the above program in PHP