☰ Year plan · Communication Technology

The AND gate on a web page

Week 10 · Unit 2 Topic 3: AND gate simulation as a PHP web page: design, code and explanation, the four cases · 3 lessons
Answers are for parents and teachers.
1
What does the safer function return for Apply with only list1 = on (list2 is missing)?
2
Write the if test for a page with three lists $x, $y and $z that lights the lamp only when all three are on.
3
Find the slip: if ($choice1 = "on" && $choice2 == "on")
4
The safer function gets list1 = on and list2 = “on ” with a space after on. What does it return, and why?
5
Say in one sentence why the page should not trust what the lists send.