This data type represents whole numbers like 6 or 7 without any decimal points.
What is an int?
What pair of symbols is used to define a list in Python?
A) {} B) () C) [] D) <>
C) []
Which keyword starts a conditional statement in Python?
A) else
B) if
C) then
D) check
B) if
What does the acronym "AI" stand for?
Artificial Intelligence
JSON stores data in pairs, where a label points to a piece of information. What are these pairs called?
A) name and number
B) key and value
C) left and right
D) first and last
B) key and value
A) Integer B) String C) Boolean D) Float
B) String
In Python lists, what index number refers to the first item?
0
What Python comparison operator is used to check if two values are equal?
What is the primary source of information that an AI uses to learn how to solve problems or answer questions?
A) Electricity
B) Data
C) Wi-Fi password
D) Computer monitors
B) Data
What is the main purpose of using JSON when building software or websites?
A) To run Python loops faster
B) To design colors and buttons on web pages
C) To store and transfer data between different systems or programs
D) To secure passwords on the internet
C) To store and transfer data between different systems or programs
Prompt: A Boolean data type can only hold two possible values. Name both of them.
True and False
Prompt: Given fruits = ["apple", "banana", "cherry"], what method would you use to add "orange" to the end of the list?
A) fruits.add("orange")
B) fruits.append("orange")
C) fruits.push("orange")
D) fruits.insert("orange")
fruits.append("orange")
Short for "else if", this keyword checks another condition if the first if statement is false.
A) elseif
B) else if
C) elif
D) iff
C) elif
Question Prompt: AI tools like Midjourney or ChatGPT that can create brand-new text, images, or music are called what?
A) Generative AI
B) Static AI
C) Manual AI
D) Physical AI
A) Generative AI
In JSON format, which of the following is NOT a valid data type you can store inside a value?
A) String
B) Number
C) Boolean
D) Python Function
D) Python Function
Converting a variable from one data type to another (like turning the string "10" into the integer 10) is known as what?
A) Casting B) Looping C) Slicing D) Importing
A) Casting
Prompt: Given the list animals = ["cat", "dog", "bird"], what will print(animals[1]) display on the screen?
A) cat
B) dog
C) bird
D) An error
B) dog
What will the following code output to the screen?
x = 10
if x > 5 and x < 8:
print("Yes")
else:
print("No")
No
When you give an AI tool a specific text instruction or question to answer, what is that input called?
Prompt
If you have the string age = "15", what built-in Python function would you use to cast it into an integer?
int(age)
How do you remove a specific value, like "dog", from a list named animals?
remove("dog")
What will this code output?
color = "Red"
if color == "red":
print("Stop")
elif color == "Red":
print("Capital Stop")
else:
print("Go")
Capital Stop
When an AI language model confidently gives a response that is completely incorrect or made up, what is this behavior commonly called?
Hallucination