Font size
WorksheetsComputer Science Principals Final
Total questions: 102
Worksheet time: 2hrs 35mins
a variable type in python
boolean
integer
string
float
if statement
the function that converts a variable to a string
str()
int()
float()
string magician
the variable type that has only 2 options: True or False
string
boolean
int
float
the name for combining two or more strings
concatenation
joining
combining
slicing
What happens if there is no else statement after an if statement?
The program will execute the else statement anyway
The program will move on to the next line of code outside of the if statement.
The program will crash
The if statement will be ignored
Which kind of loop would be used?
I need a program that will keep letting me add a monthly payment for 12 months.
FOR Loop
WHILE Loop
What is a nested loop?
when you utilize birds and nests
when one loop is put inside another loop
letting your computer calculate everything through a nest
i have no clue
What is loop iteration?
I have no clue..
when things keep going over and over and over
meaning repeating steps (or instructions) over and over again.
hoolahoop, right?
What is the final sum after this loop executes?
Final sum = 10
Final sum = 2
Final sum = 0
What is the output to the console for the featured program?
8
len(name)
4
Samantha
What is the output to the console for the featured program?
False
True
cat
concatenation
Which keyword is used to make a decision in Python?
if
else
for
while
Which function is used to get user input in Python?
read_input()
get_input()
user_input()
input()
When defining a function, the definition must occur before it is called.
true
false
What does the following code output?
11, 9
16, 16
None, None
225, 117
Order the below into the correct order for an assignment statement in Python. Not all options are used.
(a) (b) (c)
What is a variable in Python?
A type of Python version
A reserved memory location to store values
A specific Python data type
A command that executes Python scripts
What is loop iteration?
I have no clue..
when things keep going over and over and over
meaning repeating steps (or instructions) over and over again.
hoolahoop, right?
What is a nested loop?
when you utilize birds and nests
when one loop is put inside another loop
letting your computer calculate everything through a nest
i have no clue
What is the output of the code?
6
10
18
12
What is the output of the code?
108
100
113
109
What is the output of the code?
10,000
10,000,000
1,000,000
1,000,000,000,000
What is the output of the code?
2
8
1
0
What is the output of the code?
6
-6
7
13
What is the output of the code?
11
55
0
-11
What is the output of the code?
santa = -20
grinch = -40
santa = 21
grinch = -45
santa = -21
grinch = 45
santa = 1
grinch = 5
What is the output of the code?
flower = 19
seed = 43
flower = 18
seed = 53
flower = 11
seed = 9
flower = 20
seed = 49
What computer science concept stores information to be used later?
Conditional
Variable
Loop
Function
What computer science concept does something different depending on the situation?
Conditional
Variable
Loop
Function
What concept repeats whatever is inside it?
Conditional
Variable
Loop
Function
What data type can hold more than one value?
String
Integer
List
Boolean
What data type would store the value: 6.4?
String
List
Boolean
Float
What data type would store the value: Oranges
String
Float
Boolean
Integer
What data type would store the value: True
Boolean
String
Integer
Float
What data value would store the value: 9?
Float
Integer
String
Boolean
What keyword do you use to start a function?
Function
Def
In
Key
What type of loop do you use to loop through a list?
While..true
Do...while
For...in
Forever
What would you put in an if statement to see if two values are equal?
++
==
//
||
What symbol is used to either add two numbers together or join two strings?
-
=
+
*
What symbol is used to multiply two numbers together?
+
=
*
/
What is the name of the method that is always called when a new object is created from a class?
__start__
__object__
__method__
__init__
A function that can only be used by a class is called?
Method
Conditional
Function
Value
Innovation
A new or improved idea, device, product, etc, or the development thereof
A way of representing information using only two options
· A contraction of "Binary Digit"; the single unit of information in a computer, typically represented as a 0 or 1
Time it takes for a bit to travel from its sender to its receiver.
Binary:
A set of rules governing the exchange or transmission of data between devices.
a simplified representation of something more complex. Abstractions allow you to hide details to help you manage complexity, focus on relevant concepts, and reason about problems at a higher level.
A way of representing information using only two options
having multiple backups to ensure reliability during cases of high usage or failure.
Bit
A set of rules governing the exchange or transmission of data between devices.
The number of bits that are conveyed or processed per unit of time. e.g. 8 bits/sec.
Time it takes for a bit to travel from its sender to its receiver.
A contraction of "Binary Digit"; the single unit of information in a computer, typically represented as a 0 or 1
What computer science concept stores information to be used later?
Conditional
Variable
Loop
Function
What computer science concept does something different depending on the situation?
Conditional
Variable
Loop
Function
What concept repeats whatever is inside it?
Conditional
Variable
Loop
Function
What data type can hold more than one value?
String
Integer
List
Boolean
What data type would store the value: 6.4?
String
List
Boolean
Float
What data type would store the value: Oranges
String
Float
Boolean
Integer
What data type would store the value: True
Boolean
String
Integer
Float
What data value would store the value: 9?
Float
Integer
String
Boolean
What keyword do you use to start a function?
Function
Def
In
Key
What type of loop do you use to loop through a list?
While..true
Do...while
For...in
Forever
What would you put in an if statement to see if two values are equal?
++
==
//
||
What symbol is used to either add two numbers together or join two strings?
-
=
+
*
What symbol is used to multiply two numbers together?
+
=
*
/
What is the name of the method that is always called when a new object is created from a class?
__start__
__object__
__method__
__init__
A function that can only be used by a class is called?
Method
Conditional
Function
Value
What is an algorithm?
Patterns and trends used to solve a problem
A set of step-by-step instructions to resolve a problem
A programming language
What are algorithms used for?
To plan out the solution to a problem
As a platform to program a solution
To test a solution to a problem
What are the only two numbers you can use in binary?
0 and 1
1 and 2
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
1, 2, 4, 8, 16
What is the point of binary?
It represents how computers interpret electrical signals
Because we like to make you do extra math
It is fun
Because it describes star systems
How is our number system different from the binary system?
Our number system is base 5; the binary system is base 3
Our number system is base 10; the binary system is base 2
Our number system is base 10; the binary system is base 1
Our number system is base 100; the binary system is base 2
An advantage of programming in Low Level is
Easier for us to understand
Easier to debug
Programs require less file space
A disadvantage of programming in Low Level is
No technical skill is required
Needs to be translated before it can be executed
Difficult for humans to debug
An advantage of programming in High Level is
Easier for us to understand
Useful for device drivers
Programs execute faster than other generations
A disadvantage of programming in High Level is
A lot of code must be translated before it can be executed
Difficult to debug
High level of technical skill is required
Sequencing is…
a list of instructions which are followed in a set order
a list of instructions where there is a choice based on a condition
A list of instructions which will loop based on a condition
A list of instructions which will loop forever
Iteration is...
a list of instructions which are followed in a set order
a list of instructions where there is a choice based on a condition
A list of instructions which will loop based on a condition
A list of instructions which will loop forever
Selection is...
a list of instructions which are followed in a set order
a list of instructions where there is a choice based on a condition
A list of instructions which will loop based on a condition
A list of instructions which will loop forever
2
00
01
10
11
11
2
3
4
5
4
100
101
110
111
101
2
3
4
5
6
100
101
110
111
1100
12
13
14
15
13
1100
1101
1110
1111
1110
12
13
14
15
15
1100
1101
1110
1111
10000
4
8
16
32
Which of these are the correct place values for binary?
128,64,32,16,8,4,2,1
128, 68,34,12,6,4,2,1
1,0
0,1
