Symbols
I can't think of a category name
AP exam knowledge
Do it at the board!
Types
100

what character is used for comments?

#-hashtag

100

What is a program made of?

a collection of program statements

100

How do you use the print() function to display the message "Hello, World!"?

print("Hello, World!")

100

Write a code snippet that prints the following output:

I have 3 apples.

You have 5 apples.

One example:

print("I have 3 apples.\nYou have 5 apples.")

100

What are the four Built-in types that we focused on in the lecture?

Integers, Floating-point (float), strings, boolean

200

What is the role of the '\n' character in a string?

The end of a line.

200

What does dynamic typing mean in python?

Refers to the ability of a variable to dynamically change its data type

200

What do we call the act of combining strings using the + operator?

Concatenation 

200

Provide 3 examples of dynamic typing.

x=1

x=3.0

x='hello'

200

give an example of integer and a float using the same number.

1, 1.0

300

What is the file extension used for Python scripts?

.py

300

Explain why the statement 10 = y is an error in Python.

In Python, the equal sign (=) is used for assignment, not for equality testing. The correct syntax is y = 10.

300

What is casting, and why is it used in Python?

Casting is the process of converting one data type to another. It is used to ensure that the data type of a variable is appropriate for the operation being performed.

300

Create a Python code snippet that means the following (3 is not equal to 5) print the result.

print(3 != 5) would print True

300

Explain why the type() function is used when dealing with user input.

 The type() function is used to determine the data type of user input because, by default, the input function returns a string.

400

what does = and == mean in python?

= is an assignment to the variable

== means equal to

400

Why is program input important, and what are the various forms it can take?

Program input is crucial for obtaining data from the user, and it can come in various forms such as tactile, audio, visual, or text.

400

What language-agnostic syntax does the AP Exam use for testing programming questions?

The AP Exam uses either "text" format or "block" format for language-agnostic syntax.

400

Use the input() function to create a program that accepts a user's name and prints a greeting.

(Use the + symbol, also add an ! point at the end of the greeting)

name=(input("what is your name?"))

print('hello',name+'!')

400

What are the 6 basic built-in types?

int, float, complex, boolean, string, nonetype

500

x=5

y=3 +x

x= y+2

z=x*y

print (z)

80

500

How is the assignment operator represented on the AP Exam, and what function replaces print()?

The assignment operator uses an arrow notation, and the display() function replaces print() on the AP Exam.

500

Provide an example of all 6 built-in types. (use the format x=   )

x=1                 x='abc'

x=1.0              x= None

x=1+2i            x= true



M
e
n
u