Referenced from lesson Starting to Program
Boolean expressions are yes-or-no questions and will always evaluate to either true
(“yes”) or false
(“no”). What will each of the expressions below evaluate to? Write down the result in the blanks provided, and type them into Pyret if you’re not sure.
1) |
7) |
||
2) |
8) |
||
3) |
9) |
||
4) |
10) |
||
5) |
11) |
||
6) |
12) |
13) In your own words, desribe what > does. |
|
14) In your own words, describe what <= does. |
|
15) In your own words, desribe what <> does. |
|
16) How many Numbers are there in the entire universe? |
|
17) How many Strings are there in the entire universe? |
|
18) How many Images are there in the entire universe? |
|
19) How many Booleans are there in the entire universe? |
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). Bootstrap:Data Science by Emmanuel Schanzer, Nancy Pfenning, Emma Youndtsmith, Jennifer Poole, Shriram Krishnamurthi, Joe Politz, Ben Lerner, Flannery Denny, and Dorai Sitaram with help from Eric Allatta and Joy Straub is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.