Functions & Parameters
Control Structures
Programming with Python
The Internet
AP Exam
100

What is x called?

def a(x):

    x = x + 5

    return x

A parameter.

100

What is the loop that's used when you have to repeat a set of steps a specific number of times?

For loops.

100

What is the name of the variable that holds the value true or false?

Boolean.

100

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.

100

How much of the exam's weight is the multiple choice section?

70%

200

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

200

What is the output of the following code segment?

for i in range(6):

   print i % 2

0

1

0

1

0

1

200

What is the output of the following code segment?

name1 = "Mr._Cool"

name2 = "Mr._Cooler"

x = "is_cool"

print (name1 + x)

print (name2 + x + "er")

Mr._Cool_cool

Mr._Cooleris_cooler

200

What is the name of the cyber attack in which the attack prevents authorized users from accessing a system.

Denial of Service

(DoS)

200

When is the test?

May 15th.

300

Which of the following best explains the ability to solve problems algorithmically?

There exist some problems that cannot be solved algorithmically using any computer.

300

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

300

What is printed when this code segment runs?

myGrade = 87

print ("My grade is an " + myGrade)

Nothing, the code has a syntax error.

300

When multiple paths exist between two point, the system is....

Fault Tolerant 

300

What unit of the course has the largest exam weighting?

Algorithms and Programming

-Coding with Python

400

What is the output of the following code?

x = "|"

y = x

for i in range (4):

    print y

    y = x * i

|


|

||

400

Convert the binary string to decimal form:

110110112

21910

400

What unit has the smallest weighting on the AP exam?

Creative Development

-Program Design and Development

-Program Function and Purpose

-Collaboration

500

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

500

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

500

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

500

How much time was given to complete the AP exam's performance task?

At least 9 hours.