Beginner Terms & Concepts Flashcards

Preparation For WGU

1
Q

What is Computer Science?

A

Computer Science is the study of computers and how computer technology can be used to solve problems. It includes the study of computers, their design, and the way they process information.

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

What is a program?

A

A program is a set of instructions (specifically an algorithm) that has been coded into a language that a computer can understand. Programs give computers the instructions they need to work.

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

What is a group of connected computers called?

A

A network.

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

What is an algorithm?

A

A set of instructions that will need to be coded into a language that a computer can understand to create a program.

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

What is a computer?

A

A computer is a device that stores and processes information.

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

What is a computing system?

A

A computing system contains all the basic hardware and software that work together to make a computer run.

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

What is data?

A

Data is raw, unorganized facts.

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

What is analysis?

A

Analysis is the process of organizing, describing, and understanding data.

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

What is the hardware?

A

Hardware is the physical parts of a computer.

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

What is software?

A

Software is the code or programs that the computers run.

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

Provide examples of input hardware.

A

Keyboard, Mouse, Game Controller, Webcam, Microphone, etc.

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

Provide examples of output hardware.

A

Computer Monitor, TV Screen, Headphones, 3D Printer, etc.

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

Provide examples of processing hardware.

A

CPU (Central Processing Unit), GPU (Graphics Processing Unit), Motherboard, Microprocessor, Sound Card, & Network Card.

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

Provide examples of storage hardware.

A

RAM (Random Access Memory), ROM (Read Only Memory), SD Card, etc.

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

How are storage and processing hardware parts different?

A

Processing hardware runs programs while storage hardware stores information. Both are necessary in a computer because it is a device that stores and manipulates data (which requires a processor).

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

What is the difference between the CPU and the GPU?

A

The CPU is the main brain of a computer and runs most of the programs. It receives input information and executes commands from other hardware and software. The GPU delivers images, animations, and videos that can be viewed on the computer’s screen.

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

What is the difference between system software and application software?

A

System software makes sure that the individual hardware devices properly work together and with other programs, while application software are programs that allow the user to perform specific tasks. All applications are programs, but not all programs are applications for the consumer to use. Some programs are for the computer only.

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

What is a USB Flash Drive?

A

A USB (Universal Serious Bus) Flash Drive, otherwise known as a thumb drive, is a portable plug in device used to store information.

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

What is an operating system?

A

Operating systems are programs that communicate with hardware, allowing other programs to run in the background.

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

What is troubleshooting?

A

Troubleshooting is the process of solving problems by using a systematic, or step-by-step, approach.

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

Why is a systematic approach useful?

A

Creating a step-by-step process that is repeatable with similar results increases efficiency and decreases the need for certain resources.

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

What is the difference between troubleshooting and debugging?

A

Where troubleshooting is the general process for fixing problems, debugging specifically is for finding and fixing errors in a program or code.

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

What makes a good user interface?

A

Accessibility for all.

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

Describe the User Interface (UI).

A

The User Interface includes all the parts of a computing system that you use to operate the computer, such as a touch screen, speakers/headphones, on-screen menus, buttons, graphics, etc.

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

What are the two main types of User Interfaces (UI’s)?

A

Graphical User Interface (GUI) and Command-Line Interface (CLI)

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

What is a Graphical User Interface (GUI)?

A

A GUI is a type of User Interface that uses icons and symbols on a screen instead of just plain text.

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

What is a Command-Line Interface (CLI)?

A

A CLI uses only text to operate a computer, requiring the user to type in specific commands or phrases for it to work.

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

What is converting data into code called?

A

Encoding

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

What is converting data from code to a readable format called?

A

Decoding

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

What is the difference between data and information?

A

While data is raw, unorganized facts, information gives context to the data, processing it into usable or useful facts.

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

How many different colors can be made using hexadecimal or RGB?

A

Approximately 16 million

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

Name another term for computer.

A

Information Processor, meaning they take information and make it easier for us to use.

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

What does RADAR stand for and how is it used?

A

RADAR stands for “Radio Detection And Ranging” and it is using radio frequency to detect the presence of or distance from an object.

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

What does LIDAR stand for and how is it used?

A

LIDAR stands for “Light Detection And Ranging” and it is using laser light to measure the distance to a target.

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

Name and describe the two types of data a computer utilizes.

A

Input Data and Output Data. Input Data is the unorganized information entered into the computer, while the Output Data is the information after the computer has processed it.

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

Describe the definition of code.

A

A system of symbols, letters, and numbers used to represent something else.

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

Give an example of decoding.

A

Morse Code, where operators receive coded messages in the form of dots and dashes, and decode them into a readable format.

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

Name 3 data encoding schemes.

A

Binary, Hexadecimal, and RGB.

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

What is binary code?

A

Any code that uses 1’s and 0’s.

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

What are two most common ways colors can be encoded?

A

RGB and Hexadecimal.

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

Describe RGB.

A

RGB is color notation that uses three numbers separated by commas, where each number is between 0 and 255. Each of the three numbers represents a different shade of red, green, and blue and when combined, they can make many more colors.

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

Describe Hexadecimal.

A

The hexadecimal color notation uses six characters to represent the same 16 million colors as RGB. It uses combinations of the numbers 0-9 and letters A-F. Each set of two characters represents a different color. The first two characters represent red, the two green, and the final two blue. The combinations represent different shades of each individual color.

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

Encode the color Black in RGB.

A

0,0,0

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

Encode the color Black in Hex.

A

00 00 00

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

Give various examples of collecting data.

A

Interviews, Surveys, & Observation

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

What is one advantage conducting interviews has over handing out surveys?

A

Interviews give you more control over the process by being able to interact with the subject and prod for more relevant answers if needed.

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

If you want to gather easily computable data, which two question types should be avoided?

A

Interview-Type and Open-Ended

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

Name a few examples of when computers collect data from US citizens in mass?

A

Social Media, Navigation Systems, Voting, Census, etc.

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

What are the three different types of survey questions?

A

Open-Ended, Multiple Choice, & Linear Scale

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

What are the pros and cons of using open-ended questions in a survey?

A

Open-ended questions allow for more detailed responses, but like interview responses, the data is more difficult for a computer to analyze.

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

What are the pros and cons of using multiple choice questions in a survey?

A

Multiple choice questions are great for finding trends and patterns, making it easy for a computer to analyze, but the options are limited to the choices given.

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

What are the pros and cons of using linear scale questions in a survey?

A

Linear scale questions allow users to rank their answer, but rankings are subjective and are interpreted differently by individual users.

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

Define observation as a means of collecting data.

A

Observations require looking at an event and making a record of it.

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

What are the two primary ways to visualize data?

A

Charts and graphs.

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

When are line graphs used?

A

Line graphs are used to show how something changes over time.

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

Why are bar graphs used?

A

Bar graphs are used to compare different values in a category.

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

What type of chart shows the percentage of parts of a whole?

A

A pie chart.

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

Explain the difference between a use case and a test case.

A

Use cases are the broad tests that determine if a user is able to complete a general tasks, while test cases are specific tests that use various types of input.

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

If you want to make sure that your program will run even if things go wrong, what type of programmer are you?

A

A defensive programmer.

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

Why is testing different kinds of input important in case testing?

A

It’s important because you want to make sure your program runs no matter what the user inputs.

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

Use and test cases are used to find what in your program?

A

Errors (or bugs)

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

What is one of the best ways to ensure that your program works no matter what?

A

Intentionally get your program to produce errors to see how you can solve them.

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

What are two types of documentation you can make to help others understand your program?

A

Comments or a README files.

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

Which type of documentation helps a programmer remember what small chunks of code are supposed to do?

A

Comments

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

Why is commenting out a line of code helpful in debugging?

A

It helps you prevent a line(s) of code from running without having to delete them from the file.

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

Why are comments useful to you and other programmers?

A

It is much easier and more efficient to read a comment explaining pieces of the code than it is to try to read the code and interpret what it does.

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

Name the six top reasons to use documentation?

A

It makes it easier to find sections of code you want, explains how to use a program, gives credit, makes it easier to collaborate, helps to find bugs, and allows the programmer to write notes to themselves while programming.

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

What are some examples of comments to add as a note in your code as a reminder to come back and fix an error?

A

BUG, #TODO, or #FIXME

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

What type of documentation do you use to help a user install your program?

A

A README file.

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

What is a user guide?

A

A user guide is a document that helps the user learn the functionality of a program.

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

What do you call a text document that has no formatting, just words and punctuation?

A

A plain text file

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

What is user-centered design?

A

User-centered design is creating a program based on what users want.

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

What type of design follows the principles of usability, accessibility, and content?

A

A user-centered design.

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

What is feedback?

A

Feedback is the information gathered from users testing your program.

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

How is alpha testing different from beta testing?

A

Alpha testing is the first round of testing, and it is done with a small group of trusted people, sometimes even before a program is finished. Beta testing is the second round of tests, and it is done with a group of users from your target audience once the program is complete.

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

Will an alpha or a beta tester be likely to find more bugs?

A

An alpha tester

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

What does it mean to make a program accessible and why is it important?

A

A program is accessible if people with different abilities can use it successfully. It is important because you want to make sure that you are not excluding any group of people from using the program, based on their abilities.

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

What are the benefits of programming as a team?

A

You can accomplish bigger tasks, have a variety of strengths to draw from, extra sets of eyes to help avoid and catch mistakes, can learn from others, and have the opportunity to increase productivity and efficiency.

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

What two things are mandatory when considering using another programmer’s code, even if only using it as inspiration?

A

Getting permission and giving attribution

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

Describe each role a team of programmers plays when completing a project?

A

One is the driver and one is the navigator. The driver is in control of the keyboard, including typing in the code and double-checking their work. The navigator is in charge of telling the driver what code should be written and for catching bugs while working. It is important to rotate roles often to ensure accuracy.

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

Why is it helpful to utilize libraries when developing a program?

A

Using libraries helps save time and can prevent errors.

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

Describe attribution.

A

Giving credit to the programmer who wrote the code either in a comment or README file.

83
Q

What is referencing a source called?

A

Citing

84
Q

What is using someone else’s idea but saying it in your own words called?

A

Paraphrasing

85
Q

What are premade functions?

A

Premade functions are ready made lines of code for a specific action that are found in libraries.

86
Q

Explain the difference between an algorithm and a program.

A

An algorithm is a set of instructions to complete tasks, while a program is that algorithm translated into a language that can be understood by a computer.

87
Q

What kinds of languages do computers understand?

A

Programming languages

88
Q

What is a programming language?

A

A programming language is a language used to give specific instructions to computers.

89
Q

What is needed for computers to be able to read and run a program, that translates the program into machine code?

A

A compiler.

90
Q

What do the 0 and the 1 in machine code represent?

A

Off and On.

91
Q

Why are there different programming languages?

A

Each language has different strengths and can be used to create different kinds of programs.

92
Q

Why might learning one programming language make it easier to learn another?

A

Most programming languages use a lot of similar structures.

93
Q

How many bits are in a byte?

A

8

94
Q

What is bigger, a kilobyte or a gigabyte?

A

A gigabyte

95
Q

How do you write the number 2 in binary?

A

10

96
Q

What number does 101 represent in binary?

A

5

97
Q

Name 2 good ways to plan out a program before you code it?

A

Pseudocode or Flow Charts

98
Q

What is a web page?

A

A web page is a document that can be displayed in a web browser.

99
Q

What is a collection of web pages called?

A

A website.

100
Q

What are types of software designed to run on mobile devices called?

A

Mobile Applications

101
Q

True or false, programmers may use several languages for large projects. Defend your answer.

A

True. Each programming language has different strengths like some are faster, others are easier to write, or some show graphics better.

102
Q

What type of language means it is used to make the part of a website that can be viewed on a screen?

A

Front-End Language

103
Q

What is an example of front-end language?

A

JavaScript

104
Q

What type of language is used to organize and connect all the extra information to the front end?

A

Back-End Language

105
Q

What are some examples of back-end languages?

A

C++ or Python

106
Q

What are the pros and cons of using C++?

A

C++ runs faster than other programming languages, but it is harder to write.

107
Q

Why is it helpful to know a few different programming languages?

A

So you can combine them as necessary to create a program.

108
Q

Provide 2 examples of when a programmer might combine two different programming languages to create a program?

A

A company might start by writing their product in an easier language like Python and then go back and replace parts of the product with C++ to increase the speed at which it processes information.

A programmer might combine a language that is great for graphics with a language that is great for processing large amounts of code to increase the overall efficiency of their program.

109
Q

What is an electrical circuit?

A

A path or collection of paths through which electricity is carried.

110
Q

Describe the process by which a programmer has a solution for a problem and successfully has a computer execute that solution?

A

First, the programmer must develop an algorithm, or set of instructions. Next, that algorithm must be translated into a program that a computer can understand. Then, a compiler changes the instructions from the programming language in the program into machine code so the computer can do what the programmer wants it to do.

111
Q

What is machine code?

A

Machine code is the most basic language that all programming languages are turned into before a computer runs them.

112
Q

What is the process of translating or changing a program into machine code called?

A

Compiling

113
Q

True or false, no matter how many different programming languages are used to write a program, the machine code for each version looks the same.

A

True

114
Q

What is another name for binary?

A

Base 2 because it uses 2 digits

115
Q

Describe Base 10.

A

Base 10 is our usual way of counting. In Base 10, each place is ten times the value of the place to its right and as numbers get larger, we add digits to the next place value to the left.

Example: 1, 10, 100, 1000, etc.

116
Q

Describe binary or Base 2.

A

In binary or Base 2, numbers increase in value 2 times as we double the value of each new place. From right to left, digits have the place values of 1, 2, 4, 8, 16, 32, 64, and so on.

Examples:

3 is 11 or 1+1 (because (1x1=1) + (1x2 =2))

4 is 100 or 1+0+0 (because 1x4=4) + (0x2=0) + (0x1=0)

5 is 101 or 1+0+1 (because (1x4=4) + (0x2=0) + (1x1=1))

6 is 110 or 1+1+0 (because (1x4=4) + (1x2=2) + (0x1=0))

117
Q

What is the binary value of 37?

A

100101 or 1+0+0+1+0+1 because (1x32=32) + (0x16=0) + (0x8=0) + (1x4=4) + (0x2=0) + (1x1=1)

118
Q

What is the binary value of 11?

A

1011 or 1+0+1+1 because (1x8=8) + (0x4=0) + (1x2=2) + (1x1=1)

119
Q

What is the binary value of 120?

A

1111000 or 1+1+1+1+0+0+0 because (1x64=64) + (1x32=32) + (1x16=16) + (1x8=8) + (0x4=0) + (0x2=0) + (0x1=0)

120
Q

What is the American Standard Code For Information Interchange (ASCII)?

A

It assigns each letter of the alphabet and symbol, it’s own binary code.

121
Q

What is a bit?

A

A bit is the smallest unit of storage and represents one digit, either 1 or 0.

122
Q

What quantity of storage is 01010101?

A

Byte, because it has 8 digits.

123
Q

What is the largest number you can represent with 1 byte?

A

11111111 (8 digits), which in base 10 would be 255

124
Q

Why do RGB values only run from 0 to 255?

A

Because those are the numbers that you can represent with 1 byte.

125
Q

The name for 1,000 bytes is what?

A

A kilobyte

126
Q

How many bytes is a megabyte?

A

About 1 million

127
Q

The name for a billion bytes is what?

A

A gigabyte

128
Q

How many bytes is a terabyte?

A

About 1 trillion

129
Q

What is pseudocode?

A

Pseudocode is one way to design or plan an algorithm. It is written in a style or format that’s similar to the programming language a programmer is going to use to write a program.

130
Q

What do you call a diagram that outline the steps in a process?

A

A flow chart

131
Q

Why do programmers utilize flow charts?

A

Flow charts help programmers visualize the steps in an algorithm.

132
Q

What is computational thinking?

A

A way to problem solve by developing algorithms for a solution that can be programmed into a computer language.

133
Q

Why is creating a solution that can be reused an important part of computational thinking?

A

It makes the computer more efficient because it can reuse information/solutions it already has.

134
Q

Explain what decomposition is.

A

Decomposition is breaking down a large task into smaller tasks.

135
Q

Which one of the four parts of computational thinking is considered by most to be the key idea?

A

Algorithm Design

136
Q

Which one of the four parts of computational thinking talks about focusing on the main idea?

A

Abstraction

137
Q

What are the four parts of computational thinking?

A

Decomposition, Pattern Recognition, Abstraction, & Algorithm Design

138
Q

Which one of the four parts of computational thinking requires you to recognize where you have created solutions to similar problems that could be used to complete different tasks?

A

Pattern Recognition

139
Q

In computer science, variables are what?

A

Variables are placeholders for storing information.

140
Q

What is the difference between a variable’s identifier and its value?

A

The identifier is the name of the variable and doesn’t change, but the value is the data stored in the location designated by the variable and can change often.

141
Q

Explain what it means to declare a variable.

A

When you declare a variable, you are telling the computer to create a space for information and to assign that space a name.

142
Q

How is a string type value visually recognized?

A

With quotation marks before and after the variable, which can be any kind of character.

143
Q

What would be the value of “var_x” after this statement runs:

var_x = 6 - 4

Why?

A

2

Because this variable type is numeric, therefore the value is six minus four, or two.

144
Q

What would be the value of “var_x” after this statement runs:

var_x = “6 - 4”

Why?

A

“6 - 4”

Because this variable type is string, therefore the value is exactly what it says it is, “6 - 4”

145
Q

Assuming a player’s score starts at 0 and increases by 1 whenever they reach a goal, what data type would be best used to store this value in a variable with the identifier “score”?

A

Numeric

146
Q

What is the assignment operator and what does it do?

A

The assignment operator is the = symbol and it is used to assign values to variables.

147
Q

Label the value type:

adaLovelace = “First programmer”

A

String

148
Q

Label the value type:

Hotel_Floor = “13”

A

String

149
Q

Label the value type:

Jersey = 18

A

Numeric

150
Q

Label the value type:

QueenOf = “Sheba”

A

String

151
Q

Label the value type:

I_love_Mom = True

A

Boolean

152
Q

Does the following variable name meet the naming rules?

RangersScore

Why?

A

Yes, because it starts with a letter, isn’t too long, and doesn’t have a space between the words.

153
Q

Does the following variable name meet the naming rules?

“teacherNames”

Why?

A

No, because it starts and ends with quotation marks. Quotation marks are only used to identify a string value and not in a variable name.

154
Q

Does the following variable name meet the naming rules?

School Assignment

Why?

A

No, because it has a space in the name

155
Q

Does the following variable name meet the naming rules?

My_Absolute_Best_Ever_Summer_Vacation_Do_You_Want_To_Hear_About_It

Why?

A

No, because it is too long

156
Q

Does the following variable name meet the naming rules?

6ofSpades

Why?

A

No, because it starts with a number

157
Q

What does “=” mean in programming?

A

It means “is assigned”

158
Q

Describe a Boolean value.

A

A Boolean value can only have two possible values, true or false.

159
Q

What type of variable stores an entire list of information?

A

An Array Variable

160
Q

What is the difference between an “if” statement and an “else if” statement?

A

An “else if” statement is always nested within an “if” statement and doesn’t exist on its own. An “if” statement can exist without an “else if” statement.

161
Q

Assume a player scored 15 points by the time they completed a game. Does the following evaluate to true or false?

Player Score > 20 AND Player Completed Game

A

False

162
Q

Assume an alien in a game has been aggravated and is 200 feet away from the player. Would the alien attack the player based on the following conditional statement?

If alien is aggravated OR if alien is within 100 feet, Then attack player

A

Yes

163
Q

When would you use an “else if” statement versus nested conditional statements?

A

If the conditions are dependent on each other, then an “else if” statement should be used, otherwise a nested conditional as appropriate.

164
Q

Which part of the pseudocode below is the conditional part of the statement?

If it is summer,
Then display “Swimming Pool Open?

A

If it is summer

165
Q

If player answers 10 questions correctly, Give player 10 coins

Else if player answers 8 or more answers correctly, Give player 4 coins

Else if player answers 5 or more answers correctly, Give player 1 coin

Else, Give Player 0 coins

Assuming a player answered seven quiz questions correctly, how many coins would they earn?

A

1 coin

166
Q

Assume it is winter when an electronic display runs the code below. What will the display say?

If it is summer, Then display “Swimming Pool Open!”

Else, Display “Swimming Pool Closed”

A

“Swimming Pool Closed”

167
Q

What type of statement follows the if this, then that format?

A

Conditional Statements

168
Q

What are used in programming to form Boolean expressions?

A

Comparison Operators

169
Q

Describe a Comparison Operator.

A

Comparison Operators are symbols used when comparing values like…

> is greater than
< is less than
= is greater than or equal to
<= is less than or equal to
== is equal to
!= is not equal to

170
Q

What is a Compound Conditional?

A

Compound Conditionals are conditionals that combine two or more Boolean expressions.

171
Q

What are used to combine Compound Conditional expressions?

A

Logical Operators, such as AND, OR, and NOT

172
Q

When would AND statements be true?

A

When both conditions are true

173
Q

When would AND statements be false?

A

When one or both conditions is false

174
Q

When would OR statements be true?

A

When at least one of the conditions is true

175
Q

What is unique about NOT statements compares to AND and OR statements?

A

NOT statements don’t compare two conditions, instead, it reverses the value from True to False and False to True.

NOT False —> True
NOT True —> False

176
Q

What is one conditional inside of another conditional?

A

A nested conditional

177
Q

What type of conditional statement is the following:

If the pet is awake, and if the pet’s hunger is below 50 percent, then show a happy mood, else show a hungry mood.

A

A nested conditional

178
Q

If the pet is awake, and if the pet’s hunger is below 50 percent, then show a happy mood, else show a hungry mood.

Based on the above, what mood will the pet have if it is awake and its hunger level is at 75 percent?

A

Hungry

179
Q

How are While loops different from For loops?

A

While loops will repeat as long as a condition is true, but a For loop will repeat a set number of times.

180
Q

When you put a loop inside a loop, it’s called a ______________ loop.

A

Nested

181
Q

If you want to repeat a chunk of code 6 times, you should use a _______________ loop.

A

For

182
Q

What will the following print?

Repeat 3 times: Print “Jump”
Repeat 2 times: “Duck”
Print “Slide”

A

Jump, Duck, Duck, Jump, Duck, Duck, Jump, Duck, Duck, Slide

183
Q

When will the outer loop in the following pseudocode stop repeating?

While number of ice cream cones > 0:

Get a cone
Repeat 3 times: Add scoop of ice cream

A

The loop will stop running when there are zero ice cream cones.

184
Q

Why is indenting nested loops helpful when writing pseudocode?

A

Indenting is a great way to show where loops begin and end, making the code easier to read and understand.

185
Q

If you want to loop through the contents of an array, which type of loop should you use?

A

For loop

186
Q

What easily allows you to easily repeat a chunk of code many times?

A

Loop statements

187
Q

Why are loop statements beneficial?

A

Loops not only save programmers time, they also make program shorter, which makes them easier for the computer to run.

188
Q

Why should you be cautious when utilizing nested loops?

A

It is easy to get confused about which chunks of code should be repeated. The inner loop always has to run through all its sequences before the outer loop code is run again.

189
Q

Give an example of an event from a keyboard.

A

Pressing any key on a computer’s keyboard could be programmed to be an event that can be used to trigger something to happen in a program.

190
Q

How is the event handler different from an event?

A

The event handler is the code that runs when an event happens. Events are actions.

191
Q

What would you favorite app be like without events?

A

Apps and all interactive programs wouldn’t be useful without events. You wouldn’t be able to interact with it. Programs would effectively become pictures or movies that you can look at but not interact with.

192
Q

What is the event in the following pseudocode?

on-screen tap:
If player tapped balloon:
Pop balloon

A

The event is the player physically tapping the device’s screen that this program is running on.

193
Q

What is the event handler in the following pseudocode?

on-screen tap:
If player tapped balloon:
Pop balloon

A

The event handler is the code that tests if the balloon was touched and pops the balloon.

194
Q

True or False:

Events can be external actions from a user, or internal actions that happen within a program.

A

True

195
Q

A piece of code that you can easily use over and over again is called ________________?

A

A procedure

196
Q

What is the advantage of using parameters with a procedure?

A

It allows you to reuse the same code many times, even with different data.

197
Q

The output of a procedure is called the _________________ value.

A

Return

198
Q

If you want to use the same chunk of code multiple times in your program, you should make the code a _________________.

A

A procedure or function

199
Q

What is the return value for the following function?

Score = 5
FunctionScore_Bonus (score):
Return Score + 10

A

15

200
Q

What does a programmer have to do first, once they decide to use a procedure?

A

Declare it by giving it a name and adding the code you want to use as a procedure.

201
Q

What does a programmer have to do once they are ready to run the procedure?

A

When they are ready to use the procedure in their program, they have to call it to tell the computer to run it.

202
Q

Describe parameters.

A

Parameters are variables whose value is passed into a procedure. It can give limits or ranges to procedures.

203
Q

What is the difference between a parameter and a variable?

A

A parameter value can only be used within a procedure, but a variable can be used throughout the entire program.