Unit 1: Introduction to Programming

Lab 2: Gossip

1.2.3
AAP-2.D
Which two of the following sentences could be reported by gossip?
gossip: (report (join (who) ( ) (does what) ( ) (who)))
For reference:
who reporter block definition: report (item (random) of (list (Señora) (Ms. C) (my cat) (Hannah) (Jake))) does what reporter block definition: report (item (random) of (list (listened to) (loves) (ran away from) (helped) (is in a band with)))
Señora and Ms. C helped.
Señora ran away from my cat.
Hannah listened to Hannah.
Jake helped.
1.2.5
AAP-3.E
more complicated who {
    if (pick random (1) to (4)) = (3) {
        report (join (who) (', who') (does what) ( ) (who) (,))
    } else {
        report (who)
    }
} About how often will more complicated who pick the more complicated choice?
Half the time
A third of the time
A quarter of the time
Three quarters of the time
1.2.5
AAP-3.E
more complicated who {
    if (pick random (1) to (4)) = (3) {
        report (join (who) (', who') (does what) ( ) (who) (,))
    } else {
        report (who)
    }
} Here is the script inside more complicated who. What change to this script will make the more complicated phrase appear more often?
Change the 4 to 5.
Change the 4 to 3.
Change the 3 to 1.
Change the 3 to 5.
1.2.5
AAP-3.E
Click for a review of odd and even numbers.

An even number is an integer that is divisible by 2 (such as 2, 14, 0, -4, -6, -28, and -176).

In contrast, odd numbers are integers not divisible by 2 (such as 1, 3, 9, 17, -5, -33, and -221).

Which expression will return a random even number between 1 and 10?
RANDOM(2, 10)
2 * RANDOM(1, 5)
RANDOM(1, 10) / 2
RANDOM(1, 5)
1.2.5
AAP-3.E
Which expression will simulate the rolling of two dice?
RANDOM(1, 6) + RANDOM(1, 6)
2 * RANDOM(1, 6)
RANDOM(2, 12)
RANDOM(1, 12)