1.
a) The two items that are being multiplied are strings. However when the mulitiplcation is used the strings are converted into numbers and then multipled. The "12 is the dozen" turns into 12. The string is only converts when the number is at the front of the string.
b) Does the same thing as A
c) 10 mod 3. What is the remainder of 10/3. The remainder is 1 since 3*3=9
d) 10/3 would output the decimal value 3.333333
e) 10.0/3.0 would output the decimal value 3.33333
2.
"Nothing and something \'produce\' one another"
3.
things5
4.
10
0.25
5.
There Are 3 B Type Boxes
There Are 2 C Type Boxes
There Are 2 D Type Boxes
6.
Input: -5
Output: 5
Input: 5
Output: 5
7.
When $a="1" and $b=1 the out put is true. This is becuase $a is a string and not an integer the !== operator checks for content equality not the type. With $a=1 and $b=1 the output is false. This is becuase the content is equal they are both 1 but the ! turn it to false
8.
A=1
B=1
C=0
D=0
E=0
F=0
Dead End!
9.
Bacteria at 1hour(s): 2
Bacteria at 2hour(s): 4
Bacteria at 3hour(s): 8
Bacteria at 4hour(s): 16
Bacteria at 5hour(s): 32
Bacteria at 6hour(s): 64
Bacteria at 7hour(s): 128
Bacteria at 8hour(s): 256
Bacteria at 9hour(s): 512
Bacteria at 10hour(s): 1024
Bacteria at 11hour(s): 2048
10.
The length of a line from (0,0) to (5, 10) is: 11.180339887499
11.
Sum: 45
Avg: 4.5
12.
Local variables have a limited scope which is within the function itself. A local variable in a funtion will not have its data retrieved outside of the function it is in. Global variables can be accessed from anywhere in the program or php page. The scope covers the entire php code.
13.
| ID | Name | |
| 1 | Warren | |
| 2 | Brian | |
| 3 | Steph | |
| 4 | Gillian | |
Question #14
Question #15