Department of Electrical Engineering and Computer Sciences Computer Science Division
- If you’re attending this section in-person, at the end of section, you’ll be given a secret phrase. Please enter it here: https://tinyurl.com/cs10su24
- If you missed this discussion, fill out this entire worksheet, and upload it to the Gradescope assignment titled “Discussion-1” by next Discussion.
- Please open up snap.berkeley.edu/run on your computer.
- Ask the person to your right / left if they know how to whistle!
A. What What are the two principles that comprise abstraction?
B. When Rhoshandiatellyneshiaunneveshenk orders at cafes she often tells baristas that her name is “R” rather than“Rhoshandiatellyneshiaunneveshenk”. This is an example of:
- A. Object-Orientated Programming
- B. Generaliation
- C. Mutability
- D. Detail Removal
- E. None of the Above
C. In the movie Oppenheimer, Niels Bohr’s character said: (Paraphrased) “The important thing isn’t that you can read this music, it is that you can hear it.”
The idea that one can appreciate music without knowing how to read musical notation is a good example of _______.
A. Detail Removal
B. Generalization
Part 1
- How do you quickly change an add block to a subtract block?
- You’re running a program in Snap!, but it’s taking too long. How might you speed it up?
- Which symbol out of {!, @, #, $, %, ^, &, *, ~} helps you create a variable as you are typing the name of a custom block?
- To help your friend with their math homework, you want to find the tangent of 0. Which block in Snap! allows you to do that? (Hint: Look for a block that encompasses various mathematical operations.)
- You're happily drawing images in Snap! when your Sprite drifts off the stage and disappears! How do you get your Sprite back onto the stage?
Part 2
For each of the tasks listed below, find a Snap! block that accomplishes it.
- Return the opposite of True or False.
- Check if the value of a variable mystery is a text or a numerical data-type.
- Ask a question in Snap! and automatically save the answer into a variable called answer.
- Hide a Sprite from the stage (without deleting the Sprite entirely.)
- Make an extraordinarily annoying sound.
- Now make it stop (please.)