NEW
Font size
WorksheetsAP Computer Science Principles Semester 1 Python
Total questions: 75
Worksheet time: 41mins
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 in Python?
Function
Def
In
Key
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 in Python?
-
=
+
*
ASCII is a character-encoding scheme that uses a numeric value to represent each character. For example, the uppercase letter “G” is represented by the decimal (base 10) value 71. A partial list of characters and their corresponding ASCII values are shown in the table above.
ASCII characters can also be represented by binary numbers. According to ASCII character encoding, which of the following letters is represented by the binary (base 2) number 1010100?
N
P
T
W
Which of the following decimal (base-10) values is equivalent to the binary (base-2) value 101001?
22
37
41
82
What value does the above code segment display?
17
36
53
No value is ever displayed because the algorithm repeats the REPEAT UNTIL block indefinitely.
ASCII is a character-encoding scheme that uses 7 bits (8 bits if you are using the extended ASCII table) to represent each character. The decimal (base 10) values 65 through 90 represent the capital letters A through Z, as shown in the table above.
Which ASCII character is represented by the binary (base 2) number 1000001?
A
B
C
D
What is Computational Thinking?
Thinking about how computers work things out
the objective analysis and evaluation of an issue in order to form a judgement.
Abstraction, Decomposition, Pattern recognition, Algorithm Design
Nothing to do with Computer Science
Decomposition is:
what happens in the compost heap
To break things down into easier to handle chunks
Getting rid of unnecessary information
Creating a step-by-step guide to do something
what is the formal name in computing for looping?
Iteration
Selection
Repetition
For While Do
A program is expressed in a programming language. Which of the following is true of the program?
The program can also be expressed as binary code, but will be more easily understood by humans when expressed in a higher-level programming language.
The program can also be expressed as binary code, which will reduce the likelihood of errors.
The program cannot be expressed as binary code, because binary code can only be used to represent data.
Some parts of the program can be expressed as binary code, but operations must be expressed using a higher-level programming language.
A flowchart is a way to visually represent an algorithm. The flowchart above uses the building blocks from the table above.
Which of the following statements best describes the behavior of the algorithm depicted in the flowchart?
Assume a always starts greater than b.
It displays the sum of a and b.
It displays the difference between a and b.
It displays the product of a and b
It runs in an infinite loop.
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
What is the ASCII code for ... A?
65
56
97
79
What is the following word ... 79 78
OFF
ON
OR
ONE
Where is hexadecimal used on the internet?
To represent colours (RGB values)
It's written into every website to display text
Videos are stored in hex
On BBC Bitesize and that's the only place you'll ever find it
Which of the file types is an audiofile type?
jpg
mp3
png
csv
Consider the following three binary numbers:
01010
010000
1110
Which of the following lists the numbers in order from least to greatest?
010000
1110
01010
01010
1110
010000
01010
010000
1110
1110
01010
010000
Which of the following is used in Python to calculate ten squared?
Which of these codes is correct for creating a list of numbers in Python?
num = ('10','29','37','109')
num = ['10','29','37','109']
num == ('10','29','37','109')
num = ['10 29 37 109']
What is the index number for 'Spain' in Python?
['England','Brazil','Spain','France']
0
1
2
3
This question uses a robot in a grid of squares. The robot is represented as a triangle, which is initially facing up, towards the top of the grid. The robot is moved according to the instructions in the chart above.
Consider the following program which uses commands from the pseudocode described above.
REPEAT 4 TIMES {
MOVE_FORWARD()
MOVE_FORWARD()
MOVE_FORWARD()
ROTATE_RIGHT()
MOVE_FORWARD()
ROTATE_RIGHT()
MOVE_FORWARD()
ROTATE_RIGHT()
}
Which of the following images shows the path and ending location of the robot that will result from executing the code above. The starting location of the robot is shown as dotted triangle for cases where the robot does not start and end at the same location.
What is the most likely outcome of running the code shown in the image above?
It will draw a star with each side 150 pixels long.
The program will stop with an error at line 3 because parameters may not be used in for loops.
The program will stop with an error at line 5 because it is dividing by 0.
The program will run without error, but will not draw anything.
A byte is _
8 bits
16 bits
A sandwich
a computer term
A finite set of instructions that accomplish a task.
comments
problem
algorithm
variable
A process for reducing the number of bits needed to represent something without losing any information.
data compression
lossy compression
lossless compression
decompressing
A way of representing information using only 2 options.
bit
sampling
byte
binary
Online research output free of any and all restrictions on access and free of many restrictions on use, such as copyright or licenses restrictions
Open Access
Open Source
Intellectual Property
Creative ommons
An agreed-upon set of rules that specify the behavior of some system
bandwidth
protocol
redundancy
IP address
