Boolean-producing 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 your prediction in the blanks provided and then type the code into the Interactions Area to see what it returns.

Prediction Result Prediction Result

1 (<= 3 4)

2 (string>? "a" "b")

3 (= 3 2)

4 (string<? "a" "b")

5 (< 2 4)

6 (string=? "a" "b")

7 (>= 5 5)

8 (string<>? "a" "a")

9 (>= 4 6)

10 (string>=? "a" "a")

11 (<> 3 3)

12 (string<>? "a" "b")

13 (<> 4 3)

14 (string>=? "a" "b")

15 In your own words, describe what < does.

16 In your own words, describe what >= does.

17 In your own words, describe what <> does.

Prediction: Result:

18 (string=? "a tree" "trees")

19 (string=? "tree" "tree")

20 (string-contains? "catnap" "cat")

21 (string-contains? "cat" "catnap")

22 In your own words, describe what string-contains does. Can you generate another expression using string-contains that returns true?

23 There are infinite numbers values out there (…​-2,-1,0,-1,2…​ ) and infinite string values ("a", "aa", "aaa"…​) But how many different Boolean values are there?

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.