- Give the results of the following statements. Do it in your head first, then verify it in the console:
if 0 [print "0 is true"] if 13 = 13.0 [print "ok"] if 13 == 13.0 [print "ok"]
- What is the value of out after executing the following statements?
p: 7 out: either p == 7.0 ["p is 7"]["bad luck"]
- Write a code snippet that asks the user whether it is raining, and provide the appropriate whether or not it is raining. Use the multiline block style.
- Write a switch snippet where the values are of different datatypes—for example, use an item variable that has the "red" value and test on different values.
- Write a case snippet that tests whether a name word contains a vowel (a, e, i, o, or u). Hint: The conditions are of the form ...