{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

Lecture 0 - Scratch Flashcards

(39 cards)

1
Q

What is the primary focus of computer programming?

A

Taking input and creating output to solve a problem

This process is often referred to as a black box where the internal workings are not visible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What counting system do computers use?

A

Binary

Binary uses digits 0 and 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a bit?

A

A binary digit representing either a zero or one

A bit is the fundamental unit of data in computing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How many distinct values can three bits represent?

A

Eight

Three bits can represent values from 0 to 7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is ASCII?

A

A standard that maps specific letters to specific numbers

ASCII uses binary patterns to represent characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the mapping for the letter A in ASCII?

A

65

01000001 in binary represents the number 65.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does Unicode do?

A

Expands the number of bits to represent more characters and emojis

Unicode accommodates a wider range of characters than ASCII.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does RGB stand for?

A

Red, Green, Blue

RGB is a color model used to represent colors in digital images.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an algorithm?

A

A step-by-step set of instructions to solve a problem

Algorithms can vary in efficiency and speed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is big-O notation?

A

A way to describe the efficiency of an algorithm

It expresses how the time or space requirements grow relative to input size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is pseudocode?

A

A human-readable version of code

Pseudocode helps in planning and understanding algorithms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are conditionals in programming?

A

Statements that execute actions based on whether a specific condition is met

Commonly used in if-else structures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the purpose of abstraction in programming?

A

To simplify complex problems into smaller, manageable tasks

This helps in reducing complexity and improving code organization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Scratch?

A

A visual programming language developed by MIT

Scratch allows users to create programs without worrying about syntax.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the first step to create a basic Scratch program?

A

Drag the ‘when green flag clicked’ block to the programming area

This starts the execution of the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the output of the program where the cat says ‘hello, world’?

A

The cat says ‘hello, world’ when the green flag is clicked

This illustrates the input-output relationship in programming.

17
Q

What is a loop in programming?

A

A structure that repeats a block of code multiple times

Loops help in reducing repetition in code.

18
Q

What is the role of variables in programming?

A

To store data values that can change during program execution

Variables hold information that can be updated or referenced.

19
Q

What is an example of a simple conditional structure in Scratch?

A

if touching mouse-pointer? then play sound Meow

This checks a condition and executes an action based on it.

20
Q

What does the ‘forever’ block do in Scratch?

A

It continuously executes the code inside it

This is useful for ongoing checks or actions.

21
Q

What is the significance of CS50.ai?

A

An AI tool available for use during the course

It assists students without providing complete answers.

22
Q

What are conditionals in programming?

A

Conditionals are an essential building block of programming, where the program checks if a specific condition has been met and performs an action if it is.

23
Q

How does the forever block function in a conditional statement?

A

The forever block allows the if block to be triggered repeatedly, checking continuously if a condition is met.

24
Q

What is the purpose of the whenclickedforeveriftouchingmouse-pointer?thenplaysoundMeowuntildone code?

A

This code plays a sound continuously while the cat sprite is touching the mouse pointer.

25
Fill in the blank: Oscartime is one of David’s own ______ programs.
[Scratch]
26
What code is used to change Oscar's costume when the mouse is over him?
whenclickedswitchcostumetooscar1foreveriftouchingmouse-pointer?thenswitchcostumetooscar2elseswitchcostumetooscar1
27
Describe how to create a falling piece of trash in Scratch.
Use the code: whenclickedgotox:pickrandom-240to240y:180foreverifdistancetofloor>0thenchangeyby-3.
28
Fill in the blank: The code ______ allows for the possibility of dragging trash in Oscartime.
[whenclickedforeverifmousedown?andtouchingmouse-pointer?thengotomouse-pointer]
29
How do you implement scoring in Oscartime?
Use the code: whenclickedforeveriftouchingOscar?thenchangescoreby1gotox:pickrandom-240to240y:180.
30
What are the three main components of Ivy’s Hardest Game?
1. Initial position and keyboard listening 2. Movement controls for arrow keys 3. Wall detection for safe positioning.
31
What does the code definefeelforwalls do?
It checks if the sprite is touching a wall and moves it back to prevent it from walking off the screen.
32
True or False: Scratch allows multiple sprites to be on the screen at once.
True.
33
What code allows a sprite to follow another sprite in Ivy’s Hardest Game?
whenclickedgotorandom positionforeverpointtowardsHarvardmove1steps.
34
What fundamental programming skill is introduced in this course?
Pseudocoding.
35
List the basic building blocks of programming covered in this course.
* Functions * Conditionals * Loops * Variables.
36
What is the essence of the work of computer scientists?
Problem-solving.
37
Fill in the blank: This course will introduce you to a new way of learning that you can apply to almost every area of ______.
[life]
38
How are numbers, text, images, music, and video represented by computers?
They are understood and represented through various programming constructs and data types.
39
What should you do if you get frustrated while programming?
Take time to talk yourself through the problem and identify what is working and what is not.