What is x called?
def a(x):
x = x + 5
return x
A parameter.
What is the loop that's used when you have to repeat a set of steps a specific number of times?
For loops.
What is the name of the variable that holds the value true or false?
Boolean.
This term is used for the small part of a message that also contains information about where it came from and where it is going.
Packet.
How much of the exam's weight is the multiple choice section?
70%
How many parameters are entered into the function?
def sum(x, y, z, a, b, c):
randomizer = y * a % z + x - b / c
return randomizer
6
What is the output of the following code segment?
for i in range(6):
print i % 2
0
1
0
1
0
1
What is the output of the following code segment?
name1 = "Mr._Gathing"
name2 = "ArthursHair"
x = "is_cool"
print (name1 + x)
print (name2 + x + "er")
Mr._Gathingis_cool
ArthursHairis_cooler
What is the name of the cyber attack in which the attack prevents authorized users from accessing a system.
Denial of Service
(DoS)
When is the test?
May 9th.
What is the highest namespace?
Global.
What is the output of the following code segment?
x = 0
for i in range(5):
for j in range(3):
x += 1
print x
15
What is printed when this code segment runs?
myGrade = 87
print ("My grade is an " + myGrade)
Nothing, the code has a syntax error.
When multiple paths exist between two point, the system is....
Fault Tolerant
What unit of the course has the largest exam weighting?
Algorithms and Programming
-Coding with Python
What's printed from the code segment?
def a(x):
x = x + 5
return x
def b(x):
x = x * 3
return x
def c(x):
x = x % 2
return x
def rayyanIsSwag(x):
for i in range (3):
x = b(x)
x = a(x)
x = c(x)
return x
print rayyanIsSwag(4)
1
What is the output of the following code?
x = "|"
y = x
for i in range (4):
print y
y = x * i
|
|
||
What is the output when the user inputs the number 5.7?
x = float(input("Type a number "))
print ((int(x + 1 / 5) ** 3) % 5)
0
Convert the binary string to decimal form:
110110112
21910
What unit has the smallest weighting on the AP exam?
Creative Development
-Program Design and Development
-Program Function and Purpose
-Collaboration
What is printed from the code segment?
def sum(x, y, z, a, b, c):
randomizer = y * a % z + x - b / c
return randomizer
print sum(1, 2, 3, 4, 5, 6)
3
What is the output of the code segment?
time = 6
while time < 24:
time += 1
if (time % 4 == 1):
print (str(time) + " Pizza time")
9 Pizza time
13 Pizza time
17 Pizza time
21 Pizza time
What is the output of the following code segment?
import math
a = 101 % 51
b = int(math.sqrt(36))
b += 1
x = a/b
print float(x)
7.0
Convert the hexadecimal string to decimal form:
3E2A16
15,91410
How much time is given to complete the AP exam's performance task?
At least 12 hours.