Answer + Explanation:
'and' -> both statements are 'True' to evaluate as 'True'.
'or' -> at least one statement is 'True' to evaluate as 'True'.
1. True (grade has the value of 82, so the statement evaluates to 'True').
2. True (Both statements are true, this expression evaluates to 'True').
3. False (Both statements are false, this expression evaluates to 'False').
4. True (the != operator means <em>not equal.</em> Since the 'name' variable holds the string 'Rumpelstiltskin', name != 'Rumpelstiltskin' evaluates to 'False'. The 'not' operator returns the opposite of the given Boolean expression, so this expression evaluates to 'True').
5. True (name == 'Rumpelstiltskin' evaluates to 'True', so this expression is true).
6. False (All statements evaluate to 'False').
7. True (All statements evaluate to 'True').
8. False (All statements evaluate to 'True' except for <em>not(x == - 3) </em>which evaluates to 'False', so the whole statement now becomes false).
9. True (<em>grade+5 < 90 and grade >= 80 </em>evaluates to 'True', so this whole expression becomes true).
10. True (<em>grade > 0 and x % 2 == 1 </em>evaluates to 'True')
Hope this helps :)
The script that Andy would want to use is Javascript, here is the source code: document.getElementById("para1").innerHTML = formatAMPM();
function formatAMPM() {var d = new Date(), minutes = d.getMinutes().toString().length == 1 ? '0'+d.getMinutes() : d.getMinutes(), hours = d.getHours().toString().length == 1 ? '0'+d.getHours() : d.getHours(), ampm = d.getHours() >= 12 ? 'pm' : 'am', months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];return days[d.getDay()]+' '+months[d.getMonth()]+' '+d.getDate()+' '+d.getFullYear()+' '+hours+':'+minutes+ampm;<span>}
The HTML code needed to call this Javascript on his website is this: </span><span><div id="para1"></div>
</span>
You could call the Javascript up using PHP.
Hope this helps! Good luck! :)
Answer:
a. Object cannot be converted to Person
Explanation:
This program demonstrates polymorphism.
e.g., a Student IS a Person therefore you can call m() with a Student as well as a Person object.
The same goes for GraduateStudent.
However, and Object is not a Person, so the last call fails. This can be deducted by the type checking that happens at compile time.
The navigation keys allow you to move the cursor, move around in documents and webpages, and edit text.