Common Computer Science References
At the end of this lesson, you will be able to:
create test cases for your program
storyboards and flowcharts
ensuring that you know what the output from your program should be, even before you write any code is critically important
how can you know your program is working correctly is you can not test it!
but is it really that important? (see video below: ↓)
using π
it turns out that using π is so common that instead of typing 3.1415... in most programming languages have a shortcut
in JavaScript, you type: Math.PI
do demo of test cases for area of a square problem (see below: ↓)
create a web page that will do the following:
calculates the volume of a sphere
ask the user to enter the radius of the sphere
it can be a decimal number!
now create 3 test cases for this problem
see screenshots below: ↓
create the above program in PHP
if l = 5
area = l²
area = 5²
area = 25
if l = 7
area = l²
area = 7²
area = 49
if l = 15
area = l²
area = 15²
area = 225