Prompt:
what python code is gonna generate the result as shown in the image?
A. class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def myfunc(self):
print("Hello my name is " + self.name)

p1 = Person("John", 36)

del p1.age

print(p1.age)
B. fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)
C. class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def __str__(self):
return f"{self.name}({self.age})"

p1 = Person("John", 36)

print(p1)
D. class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def myfunc(self):
print("Hello my name is " + self.name)

p1 = Person("John", 36)
p1.myfunc()

A class is a template for creating objects. To create an object from a class, you must have an instance of the class. An instance is a special kind of variable that is created from a class.
The variable represents a particular object that was created from the class. The value of the variable can be changed, and the change will affect the object.
Here is an example of a class and an instance of the class:
Class Person:
def __init__(self, name, age):
self.name = name
self.age = age
The instance below represents a person with the name "John" and the age 30:
person = Person("John", 30)
The instance can be used to get or set the person's name and age. For example, you can change the person's age to 35 with the following code:
person.age = 35 The code that is gonna generate the result as shown in the image is A. class Person:
def __init__(self, name, age):
self.name = name
self.age = age
p1 = Person("John", 36)
del p1.age
print(p1.age) The answer is A.

class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def myfunc(self):
print("Hello my name is " + self.name)

p1 = Person("John", 36)

del p1.age

print(p1.age)

fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)

class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def __str__(self):
return f"{self.name}({self.age})"

p1 = Person("John", 36)

print(p1)

class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def myfunc(self):
print("Hello my name is " + self.name)

p1 = Person("John", 36)
p1.myfunc()


Prompt:
what python code is gonna generate the result as shown in the image?
A. class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def myfunc(self):
print("Hello my name is " + self.name)

p1 = Person("John", 36)

del p1.age

print(p3.age)
B. fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)
C. class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def __str__(self):
return f"{self.name}({self.age})"

p1 = Person("John", 36)

print(p3)
D. class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def myfunc(self):
print("Hello my name is " + self.name)

p1 = Person("John", 36)
p3.myfunc()

A class is a template for creating objects. It tells you how to initialize an object, and what methods it has.
A method is a block of code that you can call on an object. Every class has at least one method, called the init method. The init method is called when an object is created.
To create a new object of a class, you can use the class itself. For example, consider the following class:
Here, the class defines the init method. It takes two parameters, x and y.
You can use the class to create a new object by saying that it is instantiated from the class. For example:
Here, we instantiate the MyClass class with the parameters 3 and 5. The answer is A.

class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def myfunc(self):
print("Hello my name is " + self.name)

p1 = Person("John", 36)

del p1.age

print(p3.age)

fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)

class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def __str__(self):
return f"{self.name}({self.age})"

p1 = Person("John", 36)

print(p3)

class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def myfunc(self):
print("Hello my name is " + self.name)

p1 = Person("John", 36)
p3.myfunc()


Prompt:
what code would generate this webpage in the browser?
A. <!DOCTYPE html>

JavaScript Functions

Using a function as a variable:

B. <!DOCTYPE html>

JavaScript Functions

Call a function which performs a calculation and returns the result:

C. <!DOCTYPE html>

JavaScript Functions

Invoke (call) a function that converts from Fahrenheit to Celsius:

D. <!DOCTYPE html>

JavaScript Functions

Invoke (call) a function to convert from Fahrenheit to Celsius:

A.

This is a webpage. It is generated by the code in the script tag. The code inside the script tag contains a function call. The answer is A.

<!DOCTYPE html>

JavaScript Functions

Using a function as a variable:

<!DOCTYPE html>

JavaScript Functions

Call a function which performs a calculation and returns the result:

<!DOCTYPE html>

JavaScript Functions

Invoke (call) a function that converts from Fahrenheit to Celsius:

<!DOCTYPE html>

JavaScript Functions

Invoke (call) a function to convert from Fahrenheit to Celsius:


Prompt:
what code would generate this webpage in the browser?
A. <!DOCTYPE html>

JavaScript Objects

If you access an object method without (), it will return the function definition:

B. <!DOCTYPE html>

JavaScript Objects

C. <!DOCTYPE html>

JavaScript Objects

There are two different ways to access an object property.

You can use person.property or person["property"].

D. <!DOCTYPE html>

JavaScript Objects

An object method is a function definition, stored as a property value.

A.

What code would generate this webpage in the browser?

A webpage is a file with the extension .html. This snippet of code would generate a webpage with the title "JavaScript Objects" and the content inside the <body> tag.
The answer is A.

<!DOCTYPE html>

JavaScript Objects

If you access an object method without (), it will return the function definition:

<!DOCTYPE html>

JavaScript Objects

There are two different ways to access an object property.

You can use person.property or person["property"].

<!DOCTYPE html>

JavaScript Objects

An object method is a function definition, stored as a property value.


Prompt:
what code would generate this webpage in the browser?
A. <!DOCTYPE html>

JavaScript Objects

If you access an object method without (), it will return the function definition:

B. <!DOCTYPE html>

JavaScript Objects

C. <!DOCTYPE html>

JavaScript Objects

There are two different ways to access an object property.

You can use person.property or person["property"].

D. <!DOCTYPE html>

JavaScript Objects

An object method is a function definition, stored as a property value.

A.

What code would generate this webpage in the browser?

There are four different ways to create an object. You can use a comma to separate properties, or you can use an object literal. The first way is shown here:

const person = {
firstName: "John",
lastName : "Doe",
id : 5568,
fullName : function() {
return this.firstName + " " + this.lastName;
}
};

The answer is A.

<!DOCTYPE html>

JavaScript Objects

If you access an object method without (), it will return the function definition:

<!DOCTYPE html>

JavaScript Objects

There are two different ways to access an object property.

You can use person.property or person["property"].

<!DOCTYPE html>

JavaScript Objects

An object method is a function definition, stored as a property value.


Prompt:
Which Python code can generate the content of the image?
A. def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [1, 2, 3]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))
B. def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [0, 2, 3]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))
C. def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [1, 4, 3]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))
D. def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [1, 2, 4]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))

def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [1, 2, 3]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2)) The answer is B.

def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [1, 2, 3]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))

def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [0, 2, 3]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))

def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [1, 4, 3]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))

def list_to_dictionary(keys, values):
return dict(zip(keys, values))
list1 = [1, 2, 4]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))


Prompt:
Which Python code can generate the content of the image?
A. a, b = 1,2
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block")
B. a, b = 1,1
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block")
C. a, b = 1,0
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block")
D. a, b = 1,0
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("block")

A code block is a group of lines containing Python instructions. A code block does not need to start with the word "def" or "class," but it does need to end with a semicolon.
The first line of a code block is the most important. It tells the Python interpreter which function or class the code block defines.
After the first line, the code block may contain one or more instructions. An instruction is a command for the Python interpreter to perform some action.
Here is a simple code block that defines a function:
The first line tells the Python interpreter to define a function called "add." The second line is the function's body. It contains the instructions that make up the function.
Here is a simple code block that defines a class:
The first line tells the Python interpreter to define a class called "Rectangle." The second line is the class's body. It contains the instructions that make up the class.
You can organize code blocks into functions or classes to make your code easier to read and understand. This code block uses a variable to store a value that is not a number.
The variable a represents the number of blades of grass.
The code block raises a ZeroDivisionError when it is executed. This means that the code block cannot divide a number by zero. The answer is C.

a, b = 1,2
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block")

a, b = 1,1
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block")

a, b = 1,0
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block")

a, b = 1,0
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("block")


Prompt:
Which Python code can generate the content of the image?
A. list = ["world", "Ok", "Bye!"]
combined_string = " ".join(list)
print(combined_string)
B. list = ["Hello", "world", "Ok", "Bye!"]
combined_string = " ".join(list)
print(combined_string)
C. list = ["Hello", "world", "Ok"]
combined_string = " ".join(list)
print(combined_string)
D. list = ["Hello", "world", "Bye!"]
combined_string = " ".join(list)
print(combined_string)

A Python code can generate the content of the image by using the `join` method to concatenate the elements of a list into a single string.
The `join` method joins the elements of a list into a string, separating each element by a specified separator. The answer is B.

list = ["world", "Ok", "Bye!"]
combined_string = " ".join(list)
print(combined_string)

list = ["Hello", "world", "Ok", "Bye!"]
combined_string = " ".join(list)
print(combined_string)

list = ["Hello", "world", "Ok"]
combined_string = " ".join(list)
print(combined_string)

list = ["Hello", "world", "Bye!"]
combined_string = " ".join(list)
print(combined_string)


Prompt:
Which Python code can generate the content of the image?
A. from collections import Counter
result = Counter('apple')
print(result)
B. from collections import Counter
result = Counter('Canada')
print(result)
C. from collections import Counter
result = Counter('strawberry')
print(result)
D. from collections import Counter
result = Counter('banana')
print(result)

From the Python code examples, choose the one that can generate the content of the image.
The code below counts the number of occurrences of each word in the sentence.
result = Counter('I have two brothers and one sister.')
The answer is A.

from collections import Counter
result = Counter('apple')
print(result)

from collections import Counter
result = Counter('Canada')
print(result)

from collections import Counter
result = Counter('strawberry')
print(result)

from collections import Counter
result = Counter('banana')
print(result)


Prompt:
Which Python code can generate the content of the image?
A. count = 0
while (count < 9):
print 'The count is:', count
count = count + 2

print "Good bye!"
B. count = 0
while (count < 10):
print 'The count is:', count
count = count + 1

print "Good bye!"
C. count = 0
while (count < 9):
print 'The count is:', count
count = count + 1

print "Good bye!"
D. count = 1
while (count < 9):
print 'The count is:', count
count = count + 1

print "Good bye!"

To generate the content of the image, the Python code must do the following:
Generate the numbers 1 to 9.
Print the numbers in order.
Print "The count is: 5" and "Good bye!"
The code does not do these things. So, it cannot generate the content of the image. The answer is B.

count = 0
while (count < 9):
print 'The count is:', count
count = count + 2

print "Good bye!"

count = 0
while (count < 10):
print 'The count is:', count
count = count + 1

print "Good bye!"

count = 0
while (count < 9):
print 'The count is:', count
count = count + 1

print "Good bye!"

count = 1
while (count < 9):
print 'The count is:', count
count = count + 1

print "Good bye!"


Prompt:
Which Python code can generate the content of the image?
A. count = 0
while count < 5:
print count, " is less than 5"
count = count + 2
else:
print count, " is not less than 5"
B. count = 1
while count < 5:
print count, " is less than 5"
count = count + 1
else:
print count, " is not less than 5"
C. count = 0
while count < 5:
print count, " is less than 5"
count = count + 1
else:
print count, " is not less than 5"
D. count = 0
while count < 5:
print count, " is less than 5"
count = count + 1
else:
print count, " is not less than 6"

Each line of code in the image generates one word in the output. The words in the output are "is less than 5," "is less than 4," "is less than 3," "is less than 2," and "is not less than 5."
To generate the content of the image, copy the code from the image and paste it into a new Python file. Then, save the file with the extension .py. The code in the image will generate the words "is less than 5," "is less than 4," "is less than 3," "is less than 2," and "is not less than 5." The answer is A.

count = 0
while count < 5:
print count, " is less than 5"
count = count + 2
else:
print count, " is not less than 5"

count = 1
while count < 5:
print count, " is less than 5"
count = count + 1
else:
print count, " is not less than 5"

count = 0
while count < 5:
print count, " is less than 5"
count = count + 1
else:
print count, " is not less than 5"

count = 0
while count < 5:
print count, " is less than 5"
count = count + 1
else:
print count, " is not less than 6"


Prompt:
Which Python code can generate the content of the image?
A. list = []
list.append('Runoob')
list.append('Google')
print list
B. list = []
list.append('Google')
list.append('Runoob')
print list
C. list = []
list.append(’Baidu')
list.append('Runoob')
print list
D. list = []
list.append(’Microsoft')
list.append('Runoob')
print list

The content of the image is a list containing the strings "Runoob" and "Google".
The Python code that generates this content is:
list.append('Google')
list.append('Runoob')
The answer is B.

list = []
list.append('Runoob')
list.append('Google')
print list

list = []
list.append('Google')
list.append('Runoob')
print list

list = []
list.append(’Baidu')
list.append('Runoob')
print list

list = []
list.append(’Microsoft')
list.append('Runoob')
print list


Prompt:
Which Python code can generate the content of the image?
A. list1 = ['physics', 'chemistry', 1997, 2000]
print list1
del list1[4]
print "After deleting value at index 2 : "
print list1
B. list1 = ['physics', 'chemistry', 1997, 2000]
print list1
del list1[3]
print "After deleting value at index 2 : "
print list1
C. list1 = ['physics', 'chemistry', 1998, 2000]
print list1
del list1[2]
print "After deleting value at index 2 : "
print list1
D. list1 = ['physics', 'chemistry', 1997, 2000]
print list1
del list1[2]
print "After deleting value at index 2 : "
print list1

Each line in the code represents a different value in the list. The values are separated by commas. The list contains four values.
These values are displayed in the order that they appear in the list. The answer is A.

list1 = ['physics', 'chemistry', 1997, 2000]
print list1
del list1[4]
print "After deleting value at index 2 : "
print list1

list1 = ['physics', 'chemistry', 1997, 2000]
print list1
del list1[3]
print "After deleting value at index 2 : "
print list1

list1 = ['physics', 'chemistry', 1998, 2000]
print list1
del list1[2]
print "After deleting value at index 2 : "
print list1

list1 = ['physics', 'chemistry', 1997, 2000]
print list1
del list1[2]
print "After deleting value at index 2 : "
print list1


Prompt:
Which Python code can generate the content of the image?
A. tup1 = ('physics', 'chemistry', 1990, 2000)
tup2 = (1, 2, 3, 4, 5, 6, 7 )
print "tup1[0]: ", tup1[0]
print "tup2[2:5]: ", tup2[1:5]
B. tup1 = ('physics', 'chemistry', 1997, 2000)
tup2 = (1, 2, 3, 4, 5, 6, 7 )
print "tup1[0]: ", tup1[0]
print "tup2[1:5]: ", tup2[1:5]
C. tup1 = ('physics', 'chemistry', 1997, 2000)
tup2 = (1, 2, 3, 4, 5, 6, 7 )
print "tup1[0]: ", tup1[0]
print "tup2[1:5]: ", tup2[2:5]
D. tup1 = ('physics', 'chemistry', 1990, 2000)
tup2 = (1, 2, 3, 4, 5, 6, 7 )
print "tup1[0]: ", tup1[0]
print "tup2[1:5]: ", tup2[1:5]

The code can be written in Python.
 tup1 = ('physics', 'chemistry', 1997, 2000)
tup2 = (1, 2, 3, 4, 5, 6, 7 )
print "tup1[0]: ", tup1[0]
print "tup2[1:5]: ", tup2[2:5] The answer is C.


Prompt:
Which Python code can generate the content of the image?
A. counter = 110
miles = 1000.0
name = "John"
print counter
print miles
print name
B. counter = 100
miles = 1001.0
name = "John"
print counter
print miles
print name
C. counter = 100
miles = 1000.0
name = "Gary"
print counter
print miles
print name
D. counter = 100
miles = 1000.0
name = "John"
print counter
print miles
print name

The content of the image is generated by the following Python code.
counter = 100
miles = 1000.0
name = "John"
print counter
print miles
print name
The answer is D.

counter = 110
miles = 1000.0
name = "John"
print counter
print miles
print name

counter = 100
miles = 1001.0
name = "John"
print counter
print miles
print name

counter = 100
miles = 1000.0
name = "Gary"
print counter
print miles
print name

counter = 100
miles = 1000.0
name = "John"
print counter
print miles
print name


Prompt:
Which Python code can generate the content of the image?
A. print str
print str[0]
print str[2:5]
print str[3:]
print str * 2
print str + "TEST"
B. print str
print str[0]
print str[2:5]
print str[2:]
print str * 2
print str + "TEST"
C. print str
print str[1]
print str[2:5]
print str[2:]
print str * 2
print str + "TEST"
D. print str
print str[0]
print str[1:5]
print str[2:]
print str * 2
print str + "TEST"

print str[2:5]
print str[3:]
print str * 2
print str + "TEST"
These choices generate the content of the image. The answer is B.

print str
print str[0]
print str[2:5]
print str[3:]
print str * 2
print str + "TEST"

print str
print str[0]
print str[2:5]
print str[2:]
print str * 2
print str + "TEST"

print str
print str[1]
print str[2:5]
print str[2:]
print str * 2
print str + "TEST"

print str
print str[0]
print str[1:5]
print str[2:]
print str * 2
print str + "TEST"


Prompt:
Which Python code can generate the content of the image?
A. list = [ 'runoob', 786 , 2.23, 'john', 70.2 ]
tinylist = [123, 'john']
print list
print list[0]
print list[1:3]
print list[2:]
print tinylist * 2
print list + tinylist
B. list = [ 'runoob', 786 , 2.23, 'john', 70.2 ]
tinylist = [123, 'john']
print list
print list[1]
print list[1:3]
print list[2:]
print tinylist * 2
print list + tinylist
C. list = [ 'runoob', 786 , 2.23, 'john', 70.2 ]
tinylist = [124, 'john']
print list
print list[0]
print list[1:3]
print list[2:]
print tinylist * 2
print list + tinylist
D. list = [ 'runoob', 787 , 2.23, 'john', 70.2 ]
tinylist = [123, 'john']
print list
print list[0]
print list[1:3]
print list[2:]
print tinylist * 2
print list + tinylist

A code generator is a program that generates code.
What does a code generator do?
A code generator takes input that describes the problem that the code is supposed to solve. The input might describe the structure of the problem, the types of data that the code will work with, or the rules that the code must follow. The code generator uses this input to generate code that solves the problem.
How do you design a code generator?
When you design a code generator, you need to decide what input the code generator will take and what output it will produce.
Inputs are data that the code generator takes in. Inputs might include text, numbers, or other code.
Outputs are data that the code generator produces. Outputs might include code, data, or other output.
When you design a code generator, you also need to decide how the code generator will work. Will the code generator generate code that is completely new, or will it generate code that is similar to code that the code generator has generated before? Will the code generator work with one type of input, or will it be able to work with many different types of input. Designing a code generator is hard because you need to decide how the code generator will work and what the code generator will do. It is easy to make mistakes when you are designing a code generator.
What are some common mistakes people make when designing code generators?
People make common mistakes when designing code generators because code generators are complex programs. It is easy to make mistakes when you are designing a code generator. Here are some common mistakes people make:
The code generator generates incorrect output.
The code generator generates output that is too complex or too simple.
The code generator generates output that depends on the user's behavior.
The code generator generates output that is based on the user's inputs.
The code generator generates output that is based on the user's preferences.
The code generator generates output that is generated once and then thrown away.
The code generator generates output that is generated once and then saved.
The code generator generates output that is generated once and then displayed. The answer is A.

list = [ 'runoob', 786 , 2.23, 'john', 70.2 ]
tinylist = [123, 'john']
print list
print list[0]
print list[1:3]
print list[2:]
print tinylist * 2
print list + tinylist

list = [ 'runoob', 786 , 2.23, 'john', 70.2 ]
tinylist = [123, 'john']
print list
print list[1]
print list[1:3]
print list[2:]
print tinylist * 2
print list + tinylist

list = [ 'runoob', 786 , 2.23, 'john', 70.2 ]
tinylist = [124, 'john']
print list
print list[0]
print list[1:3]
print list[2:]
print tinylist * 2
print list + tinylist

list = [ 'runoob', 787 , 2.23, 'john', 70.2 ]
tinylist = [123, 'john']
print list
print list[0]
print list[1:3]
print list[2:]
print tinylist * 2
print list + tinylist


Prompt:
Which Python code can generate the content of the image?
A. dict = {}
dict['one'] = "This is one"
dict[2] = "This is two"
tinydict = {'name': 'runoob','code':6734, 'dept': 'cost'}
print dict['one']
print dict[2]
print tinydict
print tinydict.keys()
print tinydict.values()
B. dict = {}
dict['one'] = "This is one"
dict[2] = "This is two"
tinydict = {'name': 'runoob','code':6734, 'dept': 'sales'}
print dict['one']
print dict[2]
print tinydict
print tinydict.keys()
print tinydict.values()
C. dict = {}
dict['one'] = "This is TWO"
dict[2] = "This is two"
tinydict = {'name': 'runoob','code':6734, 'dept': 'sales'}
print dict['one']
print dict[2]
print tinydict
print tinydict.keys()
print tinydict.values()
D. dict = {}
dict['one'] = "This is one"
dict[2] = "This is two"
tinydict = {'name': 'runoob','code':6735, 'dept': 'sales'}
print dict['one']
print dict[2]
print tinydict
print tinydict.keys()
print tinydict.values()

A dictionary is a collection of key-value pairs. You can use a dictionary to store data in a structured way.
You can use the dict class to create a new dictionary.
To add items to a dictionary, use the dict.update method.
To remove items from a dictionary, use the dict.pop method.
To access the value associated with a key, use the dict[key] method.
To add a key-value pair to a dictionary, use the dict[key] = value method.
To update the value associated with a key, use the dict[key] = value method.
To delete a key-value pair from a dictionary, use the dict.pop(key) method.
Use the print function to display the contents of a dictionary. The answer is B.

dict = {}
dict['one'] = "This is one"
dict[2] = "This is two"
tinydict = {'name': 'runoob','code':6734, 'dept': 'cost'}
print dict['one']
print dict[2]
print tinydict
print tinydict.keys()
print tinydict.values()

dict = {}
dict['one'] = "This is one"
dict[2] = "This is two"
tinydict = {'name': 'runoob','code':6734, 'dept': 'sales'}
print dict['one']
print dict[2]
print tinydict
print tinydict.keys()
print tinydict.values()

dict = {}
dict['one'] = "This is TWO"
dict[2] = "This is two"
tinydict = {'name': 'runoob','code':6734, 'dept': 'sales'}
print dict['one']
print dict[2]
print tinydict
print tinydict.keys()
print tinydict.values()

dict = {}
dict['one'] = "This is one"
dict[2] = "This is two"
tinydict = {'name': 'runoob','code':6735, 'dept': 'sales'}
print dict['one']
print dict[2]
print tinydict
print tinydict.keys()
print tinydict.values()


Prompt:
Which Python code can generate the content of the image?
A. import re
print(re.match('www', 'www.runoob.com'))
print(re.match('com', 'www.runoob.com'))
B. import re
print(re.match('www', 'www.runoob.com').span())
print(re.match('com', 'www.runoob.com'))
C. import re
print(re.match('www', 'www.runoob.com').span())
print(re.match('cn', 'www.runoob.com'))
D. import re
print(re.match('http', 'www.runoob.com').span())
print(re.match('com', 'www.runoob.com'))

import re
print(re.match('www', 'www.runoob.com'))
print(re.match('com', 'www.runoob.com'))
The output is:
www.runoob.com
com

import re
print(re.match('www', 'www.runoob.com'))
print(re.match('com', 'www.runoob.com'))

import re
print(re.match('www', 'www.runoob.com').span())
print(re.match('com', 'www.runoob.com'))

import re
print(re.match('www', 'www.runoob.com').span())
print(re.match('cn', 'www.runoob.com'))

import re
print(re.match('http', 'www.runoob.com').span())
print(re.match('com', 'www.runoob.com'))


Prompt:
Which Python code can generate the content of the image?
A. import re

line = "Cats are smarter than pigs"

matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)

if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(3)
else:
print "No match!!"
B. import re

line = "Cats are smarter than dogs"

matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)

if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(2)
else:
print "No match"
C. import re

line = "Cats are smarter than dogs"

matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)

if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(2)
else:
print "No match!!"
D. import re

line = "Cats are smarter than pigs"

matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)

if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(2)
else:
print "No match!!"

import re
line = "Cats are smarter than pigs"
matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)
if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(2)
else:
print "No match!!" The answer is A.

import re

line = "Cats are smarter than pigs"

matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)

if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(3)
else:
print "No match!!"

import re

line = "Cats are smarter than dogs"

matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)

if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(2)
else:
print "No match"

import re

line = "Cats are smarter than dogs"

matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)

if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(2)
else:
print "No match!!"

import re

line = "Cats are smarter than pigs"

matchObj = re.match( r'(.*) are (.*?) .*', line, re.M|re.I)

if matchObj:
print "matchObj.group() : ", matchObj.group()
print "matchObj.group(1) : ", matchObj.group(1)
print "matchObj.group(2) : ", matchObj.group(2)
else:
print "No match!!"


Prompt:
Which Python code can generate the content of the image?
A. import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'B23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s))
B. import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'A23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s))
C. import re
def double(matched):
value = int(matched.group('value'))
return str(value * 3)
s = 'A23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s))
D. import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'A23G4HFD568'
print(re.sub('(?P<value>\d+)', double, s))

import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'B23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s)) The answer is A.

import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'B23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s))

import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'A23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s))

import re
def double(matched):
value = int(matched.group('value'))
return str(value * 3)
s = 'A23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s))

import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'A23G4HFD568'
print(re.sub('(?P<value>\d+)', double, s))


Prompt:
Which Python code can generate the content of the image?
A. import re
result = re.match(r'(\w+)=(\d+)', 'set width=20 and height=10')
print(result)
B. import re
result = re.findall(r'(\w+)=(\d+)', 'set width=20 and height=10')
print(result)
C. import re
result = re.findall(r'(\w+)=(\d+)', 'set width=30 and height=10')
print(result)
D. import re
result = re.findall(r'(\w+)=(\d+)', 'set width=20 and height=15')
print(result)

There are many ways to format code for others to read. Here are some common methods:
1. Indenting:
Indenting is the method of adding spaces between the lines of code. The amount of space added is called the indentation level.
Here is some code indented at different levels:
Level 1
Level 2
Level 3
Level 4
The code at Level 1 is indented more than the code at Level 2. The code at Level 1 is therefore lower in the hierarchy. To compare levels, look at which code is indented further. Level 1 is further indented than Level 2.
So, Level 1 is lower in the hierarchy than Level 2.
2. Spacing:
Spacing is the method of adding spaces between the symbols in the code.
Here is some code with different spaces:
The code with more space looks nicer. It is easier to tell the symbols apart.
3. Formatting functions:
Many text editors have functions that can be used to format code. Here are some common functions:
* Absolute indentation:
This function adds the same number of spaces to each line in the code block.
* Relative indentation:
This function adds fewer spaces to the first line in the code block. The amount by which indentation is decreased determines the indentation level.
* Tabulation:
This function replaces spaces with tabs. The tabulation function can be used to indent code by adding spaces between lines.
* Expansion:
This function adds spaces between symbols. The expansion function can be used to increase the indentation level.
* Compression:
This function removes spaces between symbols. The compression function can be used to decrease the indentation level. The answer is A.

import re
result = re.match(r'(\w+)=(\d+)', 'set width=20 and height=10')
print(result)

import re
result = re.findall(r'(\w+)=(\d+)', 'set width=20 and height=10')
print(result)

import re
result = re.findall(r'(\w+)=(\d+)', 'set width=30 and height=10')
print(result)

import re
result = re.findall(r'(\w+)=(\d+)', 'set width=20 and height=15')
print(result)


Prompt:
Which Python code can generate the content of the image?
A. import math
content = locals(math)
print content
B. import math
content = dir(math)
print content
C. import re
content = dir(math)
print content
D. import numpy
content = dir(math)
print content

The Python code can generate the content of the image by using the `locals` function to get the variables in the local namespace and then printing them.
The `locals` function returns a dictionary containing the variables in the local namespace. In this case, the local namespace is the global namespace, which is the namespace that is created when the script is run. So, the variables in the local namespace are the same as the variables in the global namespace.
The `dir` function returns a list containing the names of all the variables in the global namespace. So, the `dir` function can be used to get the names of all the variables.
The `numpy` module is not imported, so it cannot be used in this code. The answer is A.

import math
content = locals(math)
print content

import math
content = dir(math)
print content

import re
content = dir(math)
print content

import numpy
content = dir(math)
print content


Prompt:
Which Python code can generate the content of the image?
A. flag = False
name = 'luren'
if name == 'python':
flag = True
print 'welcome boss'
else:
print name
B. flag = False
name = 'lumen'
if name == 'python':
flag = True
print 'welcome boss'
else:
print name
C. flag = False
name = 'luren'
if name == 'python':
flag = True
print 'welcome boss'
else:
print 'nothing'
D. flag = False
name = 'lemon'
if name == 'python':
flag = True
print 'welcome boss'
else:
print name

This is a special kind of question. It looks like a multiple-choice question, but it's actually a code-generation question. The answer is D.

flag = False
name = 'luren'
if name == 'python':
flag = True
print 'welcome boss'
else:
print name

flag = False
name = 'lumen'
if name == 'python':
flag = True
print 'welcome boss'
else:
print name

flag = False
name = 'luren'
if name == 'python':
flag = True
print 'welcome boss'
else:
print 'nothing'

flag = False
name = 'lemon'
if name == 'python':
flag = True
print 'welcome boss'
else:
print name


Prompt:
Which Python code can generate the content of the image?
A. print "My name is %s and weight is %d kg!" % ('Laura', 21)
B. print "My name is %s and weight is %d kg!" % ('Zara', 21)
C. print "My name is %s and weight is %d kg!" % ('Zara', 11)
D. print "My name is %s and weight is %d g!" % ('Zara', 21)

You can use Python to generate code that produces output. For example, the following Python code generates the code that prints "Hello, world!" to the console:
```python
print "Hello, world!"
```
You can use the same techniques to generate code that produces other types of output, such as HTML, CSS, or JSON.
To generate code that produces output, you can use the `%` operator to replace placeholders in a string with actual values. Placeholders are identified by the `%` character, and values are inserted using the `%%` operator.
For example, the following Python code generates the code that prints "My name is %s and weight is %d kg!" to the console, where `%%` is a placeholder for a value.
```python
print "My name is %s and weight is %d kg!" % ('Laura', 21)
```
To generate code that produces output with a different value, simply replace the placeholder with the desired value. For example, the following Python code generates the code that prints "My name is %s and weight is %d kg!" to the console, where `21` is the value that replaces the placeholder `21`.
```python
print "My name is %s and weight is %d kg!" % ('Zara', 21)
```
To generate code that produces output with a different value, simply replace the placeholder with the desired value. For example, the following Python code generates the code that prints "My name is %s and weight is %d kg!" to the console, where `11` is the value that replaces the placeholder `11`.
```python
print "My name is %s and weight is %d kg!" % ('Zara', 11)
```
The following code generates the code that prints "My name is %s and weight is %d g!" to the console, where `21` is the value that replaces the placeholder `21`.
```python
print "My name is %s and weight is %d g!" % ('Zara', 21)
```
The answer is B.

print "My name is %s and weight is %d kg!" % ('Laura', 21)

print "My name is %s and weight is %d kg!" % ('Zara', 21)

print "My name is %s and weight is %d kg!" % ('Zara', 11)

print "My name is %s and weight is %d g!" % ('Zara', 21)


Prompt:
Which Python code can generate the content of the image?
A. def printinfo( name, age = 30 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=50, name="miki" )
printinfo( name="miki" )
B. def printinfo( name, age = 35 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=50, name="miki" )
printinfo( name="miki" )
C. def printinfo( name, age = 35 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=52, name="miki" )
printinfo( name="miki" )
D. def printinfo( name, age = 33 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=52, name="miki" )
printinfo( name="miki" )

D. def printinfo( name, age = 33 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=52, name="miki" )
printinfo( name="miki" ) The answer is D.

def printinfo( name, age = 30 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=50, name="miki" )
printinfo( name="miki" )

def printinfo( name, age = 35 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=50, name="miki" )
printinfo( name="miki" )

def printinfo( name, age = 35 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=52, name="miki" )
printinfo( name="miki" )

def printinfo( name, age = 33 ):
print "Name: ", name
print "Age ", age
return
printinfo( age=52, name="miki" )
printinfo( name="miki" )


Prompt:
Which Python code can generate the content of the image?
A. n = 2
string = "Hello!"
print(string * n)
B. n = 6
string = "Hello!"
print(string * n)
C. n = 5
string = "Hello!"
print(string * n)
D. n = 7
string = "Hello!"
print(string * n)

The code can be generated by hand.
First, the string "Hello!" is created.
Then, n is set to 7.
Finally, the string "Hello!" is multiplied by n. The result is "Hello!" multiplied by 7, which is "Hello!" The answer is D.

n = 2
string = "Hello!"
print(string * n)

n = 6
string = "Hello!"
print(string * n)

n = 5
string = "Hello!"
print(string * n)

n = 7
string = "Hello!"
print(string * n)


Prompt:
Which Python code can generate the content of the image?
A. def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('string'))
B. def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('This is some random string'))
C. def get_vowels(string):
return [vowel for vowel in string if vowel in 'weiou']
print("Vowels are:", get_vowels('This is some random string'))
D. def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('This is a string'))

A function is a block of code that can be called from other code. Functions can make your code easier to read and understand. They can also make your code easier to reuse.
Functions can have arguments. An argument is a value that a function takes in. The function can then use that value inside the function.
Here is an example of a function that takes one argument. This function adds two numbers.
```python
def add_numbers(num1, num2):
    sum = num1 + num2
    return sum
```
In this example, the function adds the two numbers inside the function. The function also returns the sum. This function can be called with two numbers.
```python
result = add_numbers(5, 7)
print(result)
```
This will print 12. A function can also have side effects. A side effect is something that a function does, besides returning a value. For example, a function might close a file or update a variable.
Here is an example of a function that closes a file. This function must be called with the file object.
```python
def cleanup(file):
    file.close()
```
The `cleanup` function takes a file object as an argument. The function then closes the file. This function cannot be called with a file name. Only a file object can be passed to the function. The answer is A.

def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('string'))

def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('This is some random string'))

def get_vowels(string):
return [vowel for vowel in string if vowel in 'weiou']
print("Vowels are:", get_vowels('This is some random string'))

def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('This is a string'))


Prompt:
What's the function of the demonstrated object?
A. Boiling water
B. Cut vegetables
C. stir
D. Water purification

Function is a word that describes what an object does.
Functions can be simple or complex. A simple function does one thing. A complex function may do several things.
How do you determine the function of an object?
Look at the object.
Think about what it does.
The function of an object is what it does. If an object moves, keeps time, stops a bleed, or tells you the direction you are heading, it has the function of moving, keeping time, stopping a bleed, or telling you the direction. If you are trying to decide what an object is for, ask yourself what the object does. This will give you its function. The function of the demonstrated object is cut vegetables.
The object is a knife. Knives cut. The answer is B.


Prompt:
What's the function of the demonstrated object?
A. Boiling water
B. Cut vegetables
C. stir
D. Water purification

Functions are the uses of objects.
For something to be useful, it must have a function.
Look at the picture of the object.
The object can be used to stir something. Stirring helps mix things together.
The function of the object is stir. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. Boiling water
B. Cut vegetables
C. stir
D. Water purification

Functions are used to describe what an object does.
How do you describe the function of an object?
First, identify the object's body parts.
Then, describe the object's actions.
Use specific words like pour, fill, lift, and move to describe the object's actions.
Use phrases like "like a machine" to describe the object's movement.
Use words like "clean," "fill up," and "move" to describe the object's function. Boiling water is a function of a pot with a lid. The pot can hold water and cover it with a lid. When water touches the pot's hot surface, the water begins to boil.
Cut vegetables is a function of a knife. The knife can cut a piece of fruit or a vegetable into pieces that are smaller.
Stir is a function of a spoon. The spoon can move the mixture in a cup.
Water purification is a function of a filter. The filter can remove impurities from water. The answer is D.


Prompt:
What's the function of the demonstrated object?
A. copy
B. Write
C. compute
D. binding

Functions are used to describe what an object does.
An object can have more than one function. Look at the picture of the demonstrated object.
The function of the demonstrated object is write. The answer is B.


Prompt:
What's the function of the demonstrated object?
A. copy
B. Write
C. compute
D. binding

Functions are used to describe what an object does.
An object can have more than one function. Look at the picture of the object.
The function of the demonstrated object is copy. The answer is A.


Prompt:
What's the function of the demonstrated object?
A. refrigeration
B. Draw
C. cut
D. deposit

Functions are used to describe objects.
For each object, ask these questions:
What is the object made of?
What is the purpose of the object?
How is the object used?
Drawing objects shows their functions.
You can use drawings to show the purpose of an object. For example, a drawing of a hand holding a pencil shows that the pencil is for writing. The answer is B.


Prompt:
What's the function of the demonstrated object?
A. refrigeration
B. Draw
C. cut
D. deposit

Functions are used to describe the purpose of an object.
For example, a hammer has the function of hitting nails. A chair has the function of providing a seat.
To describe the function of an object, include the word function after the object. The function comes after the object in the sentence.
The function of an object is to perform a task. Each object you use is designed to perform a task. Look at the picture of the object.
The function of the demonstrated object is deposit. The answer is D.


Prompt:
What's the function of the demonstrated object?
A. Clamping
B. hit
C. Tighten tightly
D. adjust

Functions are used by objects. Look at the object.
Then, try to figure out what the object is used for.
The function of an object is to do something.
For example, a hammer is used for hitting nails. Or, a chair is used for sitting on. The function of the demonstrated object is to tighten tightly. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. Clamping
B. hit
C. Tighten tightly
D. adjust

Functions are used to describe what an object does.
The function of a object is to adjust, attach, fasten, hold, or secure two or more things together.
If you need help finding the function of an object, try asking these questions:
What does the object attach or secure?
How is the object used?
Who is the object used by?
What are the object and its counterpart used to do? The function of an object is to tighten tightly.
The object is a wrench. It can be used to tighten or loosen nuts and bolts. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. Clamping
B. hit
C. Tighten tightly
D. adjust

Functions are used by objects. Look at the object.
The function of an object is to do something.
For example, a hammer has the function of hitting nails. A clamp has the function of holding things in place. The function of a tighten tightly is to make something tight. The demonstrated object can tighten tightly. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. incise
B. Separatist
C. Clamping
D. drill

Tools are made for a function. A function is a job.
Every tool has a purpose. It can tear, cut, break, or move something. Look at the picture of the object.
The function of the demonstrated object is incise. The object is a tree branch clipper. It cuts branches off of trees. The answer is A.


Prompt:
What's the function of the demonstrated object?
A. incise
B. Separatist
C. Clamping
D. drill

Functions are used to describe what an object does.
How do you describe the function of an object?
First, identify the object's body parts. Then, use each body part to determine the function.
For example, a screw's body parts are the head and the shaft. The screw's function is to fasten.
A clamp's body parts are the jaw and the handle. The clamp's function is to hold things in place.
A machine tool's body parts are the bed, the column, and the head. The machine tool's function is to hold the workpiece and perform the cut. The function of the demonstrated object is incise.
The object is a drill press. It has a drill attachment that can be used to make holes in metal. The answer is A.


Prompt:
What's the function of the demonstrated object?
A. Measure the level
B. excavate
C. transport
D. weld

Functions are used by objects. Look at the object.
Think about what it does.
The function of an object is to do that thing.
An object can have more than one function. You can use these functions to describe the object.
A tape measure has two functions. It can measure length. It can also help you cut paper.
A hammer has two functions. It can hit things. It can also help you pull nails out of wood. The function of the demonstrated object is to measure the level.
The object gets water out of the way to show how deep the water is. This tells you how much water is left. The answer is A.


Prompt:
What's the function of the demonstrated object?
A. Measure the level
B. excavate
C. transport
D. weld

Functions are used by objects. Look at the object.
Think about what the object is used for.
The function of an object is to achieve a goal.
For example, a tape measure may have the function of measuring length. A hammer may have the function of breaking things. A chair may have the function of allowing someone to sit. The function of a wheelbarrow is to transport objects. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. Measure the level
B. excavate
C. transport
D. weld

Functions are what objects do. Functions carry out instructions.
There are six functions. You can use them to describe almost any object.
A button has the function to fasten or unfasten.
A lock has the function to keep something safe.
A magnifying glass has the function to make something bigger.
A hammer has the function to hit.
A weld has the function to join two metal objects. The function of the demonstrated object is weld. The answer is D.


Prompt:
What's the function of the demonstrated object?
A. Brushing
B. Cut the grass
C. Measure the temperature
D. burnish

Functions are what objects do. Functions can be described using words such as brush, measure, cut, and burnish.
Look at the picture of the object.
The object can measure the temperature.
This function is used to check how hot or cold something is. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. Brushing
B. Cut the grass
C. Measure the temperature
D. burnish

Functions are what objects do. Functions carry out tasks.
Before you determine the function of an object, it is important to describe the object.
Look at the object.
Think about what the object is made of.
Think about what the object is used for.
The function of an object is to carry out a task. Look at the picture of the object.
The object is made of a dark brown material.
The object is used for brushing. The function of the demonstrated object is brushing. The answer is A.


Prompt:
What's the function of the demonstrated object?
A. Cutting platform
B. clean
C. measurement
D. Bulldozing

Measurements are written with both a number and a unit. The unit comes after the number. The unit shows what the number means.
When you are using customary units, length may be written with units of inches, feet, yards, or miles.
There are 12 inches in 1 foot, and 3 feet in 1 yard. There are 5,280 feet in 1 mile.
A football is about 1 foot long. A football field is 100 yards long. The function of the demonstrated object is measurement.
Measurement tools include rulers and metersticks. Rulers have units of inches or centimeters on one side and units of feet or meters on the other side. Metersticks are also called metersticks. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. Cutting platform
B. clean
C. measurement
D. Bulldozing

Look at the object.
The object is a bulldozer. A bulldozer's function is bulldozing.
The bulldozer can push dirt around. This bulldozer is pushing the dirt on top of a piece of metal. The metal is a measurement platform. The answer is D.


Prompt:
What's the function of the demonstrated object?
A. Cutting platform
B. clean
C. measurement
D. Bulldozing

Functions are used objects' purposes.
Your mother tells you to clean your room. What is the function of cleaning? Cleaning makes your room look better.
Your teacher tells you to write numbers on a board. What is the function of writing? Writing helps you communicate with others.
Your father tells you to get out of the car. What is the function of exiting? Exiting helps you get out of the car.
Look at the object.
The demonstrated object is a cutting platform. A cutting platform's function is to cut.
The object is a circular platform with a knife attached to it. The knife can cut wood or other materials. The answer is A.


Prompt:
What's the function of the demonstrated object?
A. steam
B. Cooking
C. Cook soup
D. Fry

Functions are used to describe what an object does.
The function of a object is to do something. This something is what makes the object useful.
Different objects can have different functions. For example, a hammer is useful for hitting nails. A mirror is useful for seeing yourself. A cooking pot is useful for cooking food. Look at the picture of the object.
The object is a wok.
Woks are useful for cooking soup. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. steam
B. Cooking
C. Cook soup
D. Fry

Functions are used to describe what an object does.
For each object, try to figure out its function.
Then, compare the function of the object to the demonstrated function. The matched function is the function of the object.
If there is no matched function, then the object does not have that function. Steam is created when water boils. Water boiling is caused by heating water until it starts to bubble.
The function of steam is to provide energy for things to move or work. Cooking is a function of a pot with a lid. The pot with a lid can make food warm or hot.
The function of fry is to heat or cook food. A frying pan is used to heat or cook food.
The function of cook soup is to make soup. A pot is used to cook soup. The answer is C.


Prompt:
What's the function of the demonstrated object?
A. steam
B. Cooking
C. Cook soup
D. Fry

Functions are used to describe what an object does.
Functions can be simple or complex. A simple function has one purpose. A complex function can have more than one purpose.
Look at the picture of the object.
The demonstrated object is a frying pan.
Frying pans cook food by giving it heat. The answer is D.


Prompt:
What's the function of the demonstrated object?
A. Pick-up
B. grill
C. filtration
D. flavouring

An object's function tells you what the object is used for. Look at the picture of the object.
The demonstrated object is a grill. A grill is used to cook food by sending heat and smoke through food that is placed on top of the grill. The answer is B.


Prompt:
What's the function of the demonstrated object?
A. Pick-up
B. grill
C. filtration
D. flavouring

An object's function tells you what the object is used for. Look at the picture of the object.
The demonstrated object can be used for grilling. It has a hole in it.
The hole lets smoke and fire come out. This object can be used to cook food on a grill. The answer is B.


Prompt:
What's the function of the demonstrated object?
A. Pick-up
B. grill
C. filtration
D. flavouring

An object's function tells you what the object is used for. Look at the picture of the object.
The demonstrated object is a spice rack. Spice racks have the function of organizing spices. The answer is D.


Prompt:
What's the function of the demonstrated object?
A. Pick-up
B. grill
C. filtration
D. flavouring

An object's function tells you what the object is used for. Look at the picture of the object.
The function of the demonstrated object is flavouring. The object is used to flavour food. The answer is D.


Prompt:
What's the function of the demonstrated object?
A. Pick-up
B. baking
C. heating
D. flavouring

An object's function tells you what the object is used for. Look at the demonstrated object.
The function of the demonstrated object is baking.
The oven heats up to high temperatures to bake food. The answer is B.


Prompt:
What's the function of the demonstrated object?
A. record
B. gluing
C. Receive
D. Stationery

Functions are used to describe what an object does.
Objects can have many functions. A shovel's function is to dig. A hammer's function is to hit. A chair's function is to sit on. Look at the picture of the object.
The object is a notepad of paper. The function of a notepad of paper is to record. The answer is A.


Prompt:
What's the function of the demonstrated object?
A. Military defense
B. Recognize the direction
C. Look into the distance
D. Observe the interstellar

The function of an object is what it does.
The shape of an object tells you how it will function. Look at the picture of the object.
The object is a compass.
Compasses point to north. That's how compasses function. If you need to go somewhere, compass can tell you the way. The answer is B.


Prompt:
What's the function of the demonstrated object?
A. Military defense
B. Recognize the direction
C. Look into the distance
D. Observe the interstellar

Military defense
Navigate objects or people to safety.
Look into the distance
See objects or people that are far away.
Observe the interstellar
Look at objects in space. The answer is A.


Prompt:
What's the function of the demonstrated object?
A. Military defense
B. Recognize the direction
C. Look into the distance
D. Observe the interstellar

Look at the object.
The object is a tank. A tank's main function is military defense. The answer is A.


Prompt:
What does this sign mean?
A. Take care of your speed.
B. Smoking is prohibited here.
C. Something is on sale.
D. No photography allowed

Smoking is prohibited here.
This sign means that smoking is not allowed somewhere. The answer is B.


Prompt:
What does this sign mean?
A. Take care of your speed.
B. Smoking is prohibited here.
C. Something is on sale.
D. No photography allowed

A sign is a message that is meant to tell you something.
Signs can tell you how to do something or what not to do. They can also tell you about a place or an activity.
Look at the picture of the sign.
The sign says, "No photography allowed." It means you cannot take pictures here. The answer is D.


Prompt:
What is the most likely purpose of this poster?
A. To celebrate National Day.
B. To celebrate New Year.
C. To celebrate someone's birthday.
D. To celebrate Christmas.

To celebrate Christmas.
Christmas is shown by the poster's picture of Santa Claus coming to a house with a Christmas tree. The answer is D.


Prompt:
Which two teams will take part in this game?
A. Team A and Team D.
B. Team A and Team B.
C. Team A and Team C.
D. Team B and Team C.

Look at the board.
Team A is playing Team B.
Team C is playing Team D.
The other teams are not playing each other. The answer is B.


Prompt:
What is the most likely purpose of this poster?
A. To ask for help.
B. To advertise for a store.
C. To find qualified candidates for the open positions.
D. To show the loudspeaker.

The purpose of a poster is to get you to do something. Posters ask you to do something or tell you something.
Look at the poster.
What does it ask you to do?
The poster asks you to apply for a job. It tells you what the company is looking for and gives you information on how to apply. The answer is C.

To find qualified candidates for the open positions.


Prompt:
Which operation of fractions is represented by this formula?
A. Devide
B. Add
C. Subtract
D. Multiply

An operation on fractions is a calculation that involves fractions.
You can perform operations on fractions by following the rules for operations with numbers. The rules are:
For two numbers, a and b,
Addition: a + b
Subtraction: a - b
Multiplication: a x b
Division: a ÷ b
The result of each operation is a new fraction. For example:
Addition: The result of adding two numbers is a new number.
Subtraction: The result of subtracting two numbers is a new number.
Multiplication: The result of multiplying two numbers is a new number.
Division: The result of dividing two numbers is a new number.
To check if an operation with fractions is valid, make sure that the numbers in the fractions are not zero. If one of the numbers is zero, the operation is not valid. For example:
Division by zero is not valid.
The formula represents a division operation. To check if this operation is valid, look at the formula and count the number of division symbols (÷). The number of division symbols is 1. This operation is valid.
The formula represents a subtraction operation. To check if this operation is valid, look at the formula and count the number of subtraction symbols (-). The number of subtraction symbols is 1. This operation is not valid.
The formula represents a multiplication operation. To check if this operation is valid, look at the formula and count the number of multiplication symbols (x). The number of multiplication symbols is 1. This operation is valid.
The formula represents a division operation. To check if this operation is valid, look at the formula and count the number of division symbols (÷). The number of division symbols is 1. This operation is valid. The answer is D.


Prompt:
Which operation of fractions is represented by this formula?
A. Devide
B. Add
C. Subtract
D. Multiply

An operation on fractions is a calculation that involves fractions.
You can perform operations on fractions by following these rules:
When you multiply a fraction by a nonzero number, the result is a larger fraction.
If you multiply a fraction by zero, the result is the fraction as it is.
When you add or subtract fractions, the result is a larger fraction if the second fraction is greater than the first fraction.
If you add or subtract zero to a fraction, the result is the fraction as it is.
The formula represents a division operation. The answer is A.


Prompt:
Which operation of fractions is represented by this formula?
A. Devide
B. Add
C. Subtract
D. Multiply

An operation with fractions is a calculation that involves fractions.
When you write a fraction, it represents a part of something. For example, if you have a pie and you eat a piece of it, the piece you ate is represented by the fraction pie.
Fractions can be added or subtracted just like regular numbers. For example, the fraction 3/4 is greater than the fraction 2/4. And, 3/4 - 2/4 = 1/4.
Fractions can also be multiplied or divided. For example, you can multiply a fraction by a number to get a new fraction. For example, if you multiply the fraction 3/4 by the number 2, you get the fraction 6/4. And, you can divide a fraction by a number to get a new fraction. For example, if you divide the fraction 3/4 by the number 2, you get the fraction 1/2.
The operation of multiplying fractions is represented by the formula for multiplying two numbers.
The operation of dividing fractions is represented by the formula for dividing two numbers.
The operation of adding fractions is represented by the formula for adding two numbers.
The operation of subtracting fractions is represented by the formula for subtracting two numbers. The formula tells you to add the numerators and add the denominators. Then, the fraction will represent a larger part of something. The answer is B.


Prompt:
What does this picture want to express?
A. We are expected to work hard.
B. We are expected to care for green plants.
C. We are expected to care for the earth.
D. We are expected to stay positive.

This picture wants to express that we are expected to care for the earth.
The earth is our home. It provides us with air to breathe, water to drink, and soil to grow plants in. So, it is important to take care of the earth. The answer is C.

We are expected to care for green plants.


Prompt:
What does this picture want to express?
A. We are expected to work hard.
B. We are expected to care for green plants.
C. We are expected to care for the earth.
D. We are expected to stay positive.

This picture wants to express that we are expected to care for the earth.
The word care is shown in the picture. The hands hold the earth, which shows that they care for it. The answer is C.

We are expected to care for green plants.


Prompt:
What is the most likely purpose of this poster?
A. To celebrate National Day.
B. To celebrate New Year.
C. To celebrate someone's birthday.
D. To celebrate Christmas.

To celebrate National Day.
National Day is a celebration of a country's independence or flag day. Independent countries choose November 26 as National Day to commemorate the day their country became independent.
Flags symbolize what a country stands for. Independent countries choose their own flags after they become independent. Look at the poster.
The text on the poster says, "Happy National Day!" in red. The answer is A.


Prompt:
What is the most likely purpose of this poster?
A. To celebrate National Day.
B. To celebrate New Year.
C. To celebrate someone's birthday.
D. To celebrate Christmas.

To celebrate someone's birthday.
Happy birthday to you! This poster is celebrating someone's birthday. The answer is C.


Prompt:
Which special day is associated with this poster?
A. Mother's Day
B. Earth Day.
C. National Reading Day.
D. Water Day.

Earth Day is celebrated on April 22.
Earth Day was first celebrated in 1970. The answer is B.


Prompt:
Which special day is associated with this poster?
A. Mother's Day
B. Earth Day.
C. National Reading Day.
D. Water Day.

Earth Day is celebrated on April 22.
The answer is B.


Prompt:
Which special day is associated with this poster?
A. Mother's Day
B. Earth Day.
C. National Reading Day.
D. Water Day.

Earth Day is celebrated on April 22.
National Reading Day is celebrated on April 14. The answer is C.


Prompt:
Which special day is associated with this poster?
A. Mother's Day
B. Earth Day.
C. National Reading Day.
D. Water Day.

Mother's Day is associated with this poster.
The poster says "Happy Mother's Day!" in green text. The answer is A.


Prompt:
Which special day is associated with this poster?
A. Mother's Day
B. Earth Day.
C. National Reading Day.
D. Father's Day.

Mother's Day is associated with the poster. The answer is A.


Prompt:
Which special day is associated with this poster?
A. Mother's Day
B. Earth Day.
C. Children's Day.
D. Father's Day.

Earth Day is celebrated on April 22.
Children's Day is celebrated on June 1.
Mother's Day is celebrated on May 13.
Father's Day is celebrated on June 17. The answer is B.


Prompt:
The area of which figure can be calculated using the formula in this picture?
A. Circle.
B. Square.
C. Rectangle.
D. Triangle.

The area of a shape can be calculated using a formula. For rectangles, the formula is length x width. For squares, the formula is length x length. For triangles, the formula is base x height.
What is the formula for the area of a rectangle?
The area of a rectangle is length x width.
What is the formula for the area of a square?
The area of a square is length x length.
What is the formula for the area of a triangle?
The area of a triangle is base x height. The base of a triangle is the distance from the side of the triangle to the same side. The height of a triangle is the distance from the top of the triangle to the same side.
A triangle has a base of 3 and a height of 5. What is the area of this triangle?
The area of this triangle is 3 x 5 = 15. The shape of this triangle can be used to calculate its area.
A square has four equal sides. So, a square has a length and a width.
The area of a square is length x length. So, a square has an area of 4 x 4 = 16 square units.
A circle has a constant diameter. The diameter is the distance from the center of the circle to the edge.
The area of a circle is diameter x diameter. So, a circle has an area of 8 x 8 = 64 square units.
A rectangle has length and width.
The area of a rectangle is length x width. So, a rectangle has an area of 3 x 5 = 15 square units. The answer is C.


Prompt:
The area of which figure can be calculated using the formula in this picture?
A. Circle.
B. Square.
C. Rectangle.
D. Triangle.

The area of a shape can be calculated using a formula. For rectangles, the formula is length x width. For squares, the formula is length x length. For circles, the formula is diameter.
What is the formula for the area of a triangle?
The base of a triangle is a line segment. The height of a triangle is the line segment that rises from the base to the triangle's apex.
In a triangle, the apex is the point where the base meets the height.
So, the area of a triangle is base x height.
To find the area of a triangle, you need to find the value of x.
Think about the triangle below.
What is the base of this triangle?
The base is the line segment that is parallel to the side of the rectangle. The side of the rectangle is 3. So, the base of the triangle is 3.
What is the height of this triangle?
The height is the line segment that rises from the base to the apex. The apex is where the base meets the height.
So, the height of this triangle is 4.
Now, use the formula for the area of a triangle to find the area of this triangle.
4 x 3 = 12. The answer is C.


Prompt:
The area of which figure can be calculated using the formula in this picture?
A. Circle.
B. Square.
C. Rectangle.
D. Triangle.

The area of a shape can be calculated using the formula:
where A is the area and W is the width and H is the height.
Think about a shape's formula.
A rectangle has a width and a height. So, a rectangle's area can be calculated using the formula above.
The triangle does not have a width or a height. So, its area cannot be calculated using the formula above.
The circle has a radius, not a width or a height. So, its area cannot be calculated using the formula above.
The square has the same width and height. So, a square's area can be calculated using the formula above. The answer is B.


Prompt:
The area of which figure can be calculated using the formula in this picture?
A. Circle.
B. Square.
C. Rectangle.
D. Triangle.

The area of a shape can be calculated using the formula:
where A is the area and W is the width.
So, if you have the width of a shape, you can use the area formula to find the area.
The area of a rectangle can be calculated using the width and length of the rectangle.
The area of a square can be calculated using the width and length of the square.
The area of a triangle can be calculated using the base and height of the triangle.
The area of a circle can be calculated using the diameter.
You can find the width of a shape by looking at it.
The width of the rectangle in the picture is S.
So, the area of this rectangle can be calculated using the area formula.
The area of a square can be calculated using the width and length of the square.
The length of the square is 2.
So, the area of this square can be calculated using the area formula.
The area of a triangle can be calculated using the base and height of the triangle.
The base of the triangle is 2, and the height is S.
So, the area of this triangle can be calculated using the area formula.
The area of a circle can be calculated using the diameter.
The diameter of the circle is 2.
So, the area of this circle can be calculated using the area formula. The answer is A.


Prompt:
The area of which figure can be calculated using the formula in this picture?
A. Circle.
B. Trapezoid.
C. Ellipse.
D. Triangle.

An object's mass tells you how much matter the object contains. Mass can be used to calculate the object's volume, which tells you how much space the object takes up.
There are many different types of objects. The shape of an object tells you how it looks. Shapes can be described using words such as square, triangle, and circle.
Or, shapes can be represented using mathematics. For example, a square has four sides of equal length. A triangle has three sides of equal length. A circle is a shape with a diameter. The diameter is the distance from the center of the circle to the edge.
To calculate the area of a circle, multiply the diameter by itself.
To calculate the area of a triangle, multiply the length of one side by the length of the other side.
To calculate the area of a trapezoid, measure the length of the top and the length of the bottom. The width of the trapezoid is the difference between the two lengths.
To calculate the area of an ellipse, use the formula a^2 = l^2 + (w^2/4).
Here, a is the area of the ellipse, l is the length of the major axis, and w is the width of the ellipse.
To calculate the area of a circle, multiply the diameter by itself. The answer is A.


Prompt:
The volume of which object can be calculated using the formula in the figure?
A. Sphere.
B. Cuboid.
C. Cylinder.
D. Cone.

A container's volume tells you the amount of space the container takes up.
There are many different shapes of containers. The shape of a container affects its volume.
Think about rolling a ball of paper into a cylinder. If you roll the paper into a cylinder, it will become longer and narrower. The volume of a cylinder is affected by its length, width, and height. The volume of a cone is affected by its height and width. The volume of a rectangular prism is affected by its length, width, and height. The volume of a sphere is not affected by its shape.
If you know the length, width, and height of a container, you can use the volume formula to calculate the volume. The volume formula is length x width x height.
For example, a container that is 12 inches long, 8 inches wide, and 6 inches high has a volume of 12 x 8 x 6 = 172 cubic inches.
To calculate the volume of a container, measure the length, width, and height of the container. Then use the volume formula to calculate the volume.
There are many different shapes of containers. The shape of a container affects its volume.
A sphere is a container that is made up of hemispheres. The volume of a sphere is not affected by its shape.
A cylinder is a container that is made up of cylinders. The volume of a cylinder is affected by its length and width.
A cone is a container that is pointed. The volume of a cone is affected by its height and width.
A cuboid is a container that is made up of rectangles. The volume of a cuboid is affected by its length, width, and height. The answer is C.


Prompt:
The volume of which object can be calculated using the formula in the figure?
A. Sphere.
B. Cuboid.
C. Cylinder.
D. Cone.

A container is made of a rectangular prism. The volume of a rectangular prism can be calculated using the formula:
volume = length x width x height
If you know the values for any of the units, you can convert the volume into different units. For example, if volume is in cubic feet, and length is in feet, the volume can be written in units of cubic feet.
To calculate the volume of a different object with the same units, you must use the same formula. The volume of a sphere, a cylinder, and a cone are all written in units of cubic units. The volume of a cuboid is written in units of cubic feet, cubic meters, or other units.
So, if you know the length, width, and height of a container in units of feet, you can write the volume in units of cubic feet. If the length, width, and height are in units of inches, the volume will be written in units of cubic inches. The shape of an object affects its volume. The table below shows how volumes are written for different shapes.
Shape | Units of length | Units of volume
Sphere | cubic units | cubic units
Cylinder | cubic units | volume x diameter
Cone | conical units | volume x diameter x height
Box or cuboid | rectangular units | length x width x height
The diagram shows that the volume formula uses the length, width, and height of a container. If you know the values for any of these units, you can write the volume in different units. The answer is A.


Prompt:
Which formula has the same calculation result with the formula in the figure?
A. a^2 + 2*a*b + b^2
B. a^2 – 2*a*b + b^2
C. a^2 – 2*a*b - b^2
D. a^2 – 2*a*b + b^2

The formula in the figure is a^2 + 2*a*b + b^2.
Now look at the formula given for the result.
The formula has the same calculation result with the formula in the figure. The answer is A.


Prompt:
Which formula has the same calculation result with the formula in the figure?
A. a^2 + 2*a*b + b^2
B. a^2 – 2*a*b + b^2
C. a^2 – 2*a*b - b^2
D. a^2 – 2*a*b + b^2

The formula in the figure is a^2 + 2*a*b + b^2.
Now look at each formula to find the one with the same calculation result.
A. a^2 + 2*a*b + b^2
This formula has the same calculation result as the formula in the figure.
B. a^2 – 2*a*b + b^2
This formula differs from the formula in the figure by having a different coefficient for the b term. The coefficient in the formula is 2, which is different from the coefficient in the figure, which is 2\*a.
C. a^2 – 2*a*b - b^2
This formula differs from the formula in the figure by having a different b term. The b term in the formula is b^2, which is different from the b term in the figure, which is b.
D. a^2 – 2*a*b + b^2
This formula differs from the formula in the figure by having a different b term. The b term in the formula is b^2, which is different from the b term in the figure, which is b. The answer is A.


Prompt:
What can the formula in this picture be used to do?
A. To calculate the sum of two values.
B. To calculate the area of an object.
C. To calculate the probability of a particular event.
D. To calculate the distance of two points.

Formula are written with both a value and a formula. The value comes after the equals sign. The formula comes after the value.
The formula can tell you how to calculate a value. Or, it can tell you what a value is.
You can use a formula to calculate a value by following the instructions in the formula. For example, the formula for the area of a rectangle is length times width. To calculate the area of a rectangle, multiply the length by the width.
The formula can tell you what a value is. For example, the formula for the volume of a cube is length times width times height. The volume of a cube is length times width times height.
The formula in the picture can be used to calculate the probability of a particular event. To do this, set the probability of the event equal to the formula. Then, use the value of to calculate the probability. The answer is C.

To calculate the probability of a particular event.

To calculate the distance of two points.


Prompt:
Which formula has the same calculation result with the formula in the figure?
A. a-b
B. (a+b)*(a-b)
C. (a+b)*(a+b)
D. (a-b)*(a-b)

The formula in the figure is a-b.
The formula has the same calculation result as a-b. The calculation is:
(a-b) * (a+b) = a*b.
So, these formulas are equivalent. The answer is A.


Prompt:
This picture shows homework for Anna every weekday. Can you tell me what should Anna do on Tuesday?
A. Writing English and learning Hindi.
B. Writing Hindi and learning Maths.
C. Writing Maths and learning Hindi.
D. Writing HIndi and learning English.

This picture shows homework for Anna every weekday. Can you tell me what should Anna do on Tuesday?
A. Writing English and learning Hindi.
B. Writing Hindi and learning Maths.
C. Writing Maths and learning Hindi.
D. Writing HIndi and learning English. The answer is A.


Prompt:
This picture shows the lesson plan for Mike. Can you tell me what time should Mike learn biology on Wednesday?
A. 14:45-16:15.
B. 10:00-11:30.
C. 11:30-12:30.
D. 13:00-14:30.

Look at the lesson plan.
Mike is learning independent study on Wednesday. Independent study means that he will be learning by himself. The period from 10:00 to 11:30 is marked with blue. This color is for Monday. It is not for Wednesday.
The period from 13:00 to 14:30 is marked with purple. This color is for Friday. It is not for Wednesday.
The only period on Wednesday is from 11:30 to 12:30. This period is marked with green. This color is for Wednesday. So, Mike should learn biology on Wednesday from 11:30 to 12:30. The answer is C.


Prompt:
According to this picture, how old are Dennis.
A. 47
B. 38
C. 45
D. 29

Look at the picture.
Dennis's age is 45.
You can tell because he says he's 45 in the picture. The answer is C.


Prompt:
Which of the following captions best describes this image?
A. A child playing with a ball in a park
B. A group of people playing soccer in a field
C. A woman walking her dog on a beach
D. A man riding a bicycle on a mountain trail

The subject of an image is the main thing that the image shows.
To describe an image, you need to identify its subject. Look at the image carefully and try to describe it in words.
For example, if the image shows a towering tree trunk with branches and leaves, you might describe the image as showing a large, green tree.
The caption is a piece of writing that describes the image. The best caption for an image describes its subject.
A child playing with a ball in a park.
This caption describes the subject of an image of people playing soccer.
The answer is A.

A group of people playing soccer in a field

A man riding a bicycle on a mountain trail


Prompt:
Which of the following captions best describes this image?
A. A child playing with a ball in a park
B. A group of people playing soccer in a field
C. A woman walking her dog on a beach
D. A man riding a bicycle on a mountain trail

A mountain biker riding on a trail is shown in this photo.
The caption for this photo could be A man riding a bicycle on a mountain trail. The answer is D.

A group of people playing soccer in a field

A man riding a bicycle on a mountain trail


Prompt:
Which of the following captions best describes this image?
A. A pizza with pepperoni, mushrooms, and olives
B. A bowl of fruit with apples, bananas, and oranges
C. A plate of spaghetti with meatballs and tomato sauce
D. A sandwich with ham, lettuce, and cheese

A sandwich with ham, lettuce, and cheese
Caption: A sandwich with ham, lettuce, and cheese
This caption describes the image. The answer is D.

A pizza with pepperoni, mushrooms, and olives

A bowl of fruit with apples, bananas, and oranges

A plate of spaghetti with meatballs and tomato sauce

A sandwich with ham, lettuce, and cheese


Prompt:
Which of the following captions best describes this image?
A. A pizza with pepperoni, mushrooms, and olives
B. A bowl of fruit with apples, bananas, and oranges
C. A plate of spaghetti with meatballs and tomato sauce
D. A sandwich with ham, lettuce, and cheese

A sandwich with ham, lettuce, and cheese
Caption: A sandwich with ham, lettuce, and cheese
This caption describes the image accurately. The sandwich has ham, lettuce, and cheese. The answer is D.

A pizza with pepperoni, mushrooms, and olives

A bowl of fruit with apples, bananas, and oranges

A plate of spaghetti with meatballs and tomato sauce

A sandwich with ham, lettuce, and cheese


Prompt:
Which of the following captions best describes this image?
A. A woman standing on a balcony overlooking a city
B. A couple sitting on a bench in a park
C. A group of people walking across a bridge
D. A person sitting on a rock near a river

People say image captions are for people who can't draw. But they're really for people who can't describe.
When you look at an image, you can usually tell what it shows you. But you can't always tell someone else what to do with that image. That's where captions come in. They tell people who are going to use the image what it shows and suggests next steps.
There are rules for writing image captions. Following these rules can help your captions be clearer and more effective.
A caption should describe the most important thing in the image. The important thing may not be the same for every person looking at the image. So, you can't write a caption for a picture. You have to write a caption for the person looking at the picture.
A caption should not contain unnecessary information. For example, you don't need to write "The bright blue car in the distance." The distance shows that it's far away.
A caption should not use excessive praise or criticism. For example, you don't need to write "This exciting picture of a jet plane flying over a mountain is amazing." and "This terrible picture of a jet plane flying over a mountain is horrible." Both statements are true, but the first statement is more helpful.
A caption should not use excessive repetition. For example, you don't need to write "The beautiful red car in the driveway." and "The beautiful red car in the driveway." both describe the same thing. The answer is A.

A woman standing on a balcony overlooking a city

A group of people walking across a bridge


Prompt:
Which of the following captions best describes this image?
A. A woman standing on a balcony overlooking a city
B. A couple sitting on a bench in a park
C. A group of people walking across a bridge
D. A person sitting on a rock near a river

A woman standing on a balcony overlooking a city.
The caption is A.

A woman standing on a balcony overlooking a city

A group of people walking across a bridge


Prompt:
Which of the following captions best describes this image?
A. A boat sailing on a lake
B. A car driving on a highway at night
C. A train traveling through a tunnel
D. A plane flying through clouds

A car driving on a highway at night
This caption describes the image. The cars are driving on a highway at night. The answer is B.


Prompt:
Which of the following captions best describes this image?
A. A boat sailing on a lake
B. A car driving on a highway at night
C. A train traveling through a tunnel
D. A plane flying through clouds

A train traveling through a tunnel is shown in the image. The answer is C.


Prompt:
Which of the following captions best describes this image?
A. A boat sailing on a lake
B. A car driving on a highway at night
C. A train traveling through a tunnel
D. A plane flying through clouds

A plane flying through clouds
The clouds around the plane show that it is flying.
A boat sailing on a lake
A boat is a type of vehicle that can move on water. A sailboat uses wind to move.
A car driving on a highway at night
A car can be driven on a highway. This car is driving on a highway at night.
A train traveling through a tunnel
A train must travel through a tunnel because it cannot go above ground. The answer is D.


Prompt:
Which of the following captions best describes this image?
A. A boat sailing on a lake
B. A car driving on a highway at night
C. A train traveling through a tunnel
D. A plane flying through clouds

A boat sailing on a lake is visible in the image.
The caption is A. A boat sailing on a lake. The answer is A.


Prompt:
Which of the following captions best describes this image?
A. A person playing a piano in a studio
B. A person playing a guitar on a stage
C. A group of people dancing at a party
D. A singer performing on a microphone

People say "party" and "dance" in different ways.
When people say "party," they often sound happy and excited. A party is a get-together with people you know.
When people say "dance," they often sound rhythmic. A dance is a set of steps that people do to music. The answer is C.


Prompt:
Which of the following captions best describes this image?
A. A person playing a piano in a studio
B. A person playing a guitar on a stage
C. A group of people dancing at a party
D. A singer performing on a microphone

A singer performing on a microphone.
This caption is correct. The image shows a person singing into a microphone while standing in front of a dark background. The answer is D.


Prompt:
Which of the following captions best describes this image?
A. A person playing a piano in a studio
B. A person playing a guitar on a stage
C. A group of people dancing at a party
D. A singer performing on a microphone

People who work in recording studios call each other "studio rats." Being a studio rat can be a lot of fun. You get to work with great musicians and listen to music all day. But it can be hard work, too. Studio rats often work long hours and get paid very little. The answer is A.


Prompt:
Which of the following captions best describes this image?
A. A person hiking on a mountain trail
B. A group of people sitting around a campfire
C. A person kayaking on a lake
D. A family having a picnic in a park

The caption describes a person hiking on a mountain trail. It says the person is "hiking." So, that is what the caption tells you. The answer is A.

A group of people sitting around a campfire


Prompt:
Which of the following captions best describes this image?
A. A person hiking on a mountain trail
B. A group of people sitting around a campfire
C. A person kayaking on a lake
D. A family having a picnic in a park

Look at the image.
The caption should describe the people in the image. The answer is C.

A group of people sitting around a campfire


Prompt:
Which of the following captions best describes this image?
A. A woman getting a pedicure at a salon
B. A person holding a bouquet of flowers
C. A group of people eating at a restaurant
D. A person playing with a pet dog

A person holding a bouquet of flowers.
The caption is B.

A group of people eating at a restaurant


Prompt:
Which of the following captions best describes this image?
A. A woman getting a pedicure at a salon
B. A person holding a bouquet of flowers
C. A group of people eating at a restaurant
D. A person playing with a pet dog

A woman getting a pedicure at a salon.
This caption describes the image. The answer is A.

A group of people eating at a restaurant


Prompt:
Which of the following captions best describes this image?
A. A woman applying makeup in front of a mirror
B. A person taking a photo with a camera
C. A group of people watching a movie in a theater
D. A person reading a book in a library

A woman applying makeup in front of a mirror.
The woman is looking into a mirror as she applies makeup. This tells you that she is applying makeup in front of a mirror.
A person reading a book in a library.
The subject of the photo is reading a book. This tells you that she is reading a book in a library.
A group of people watching a movie in a theater.
The subject of the photo is looking at a movie. This tells you that she is watching a movie in a theater.
A person taking a photo with a camera.
The subject of the photo is taking a photo with a camera. This tells you that she is taking a photo with a camera. The answer is A.

A woman applying makeup in front of a mirror

A group of people watching a movie in a theater


Prompt:
Which of the following captions best describes this image?
A. A woman applying makeup in front of a mirror
B. A person taking a photo with a camera
C. A group of people watching a movie in a theater
D. A person reading a book in a library

A person reading a book in a library.
The caption is D.

A woman applying makeup in front of a mirror

A group of people watching a movie in a theater


Prompt:
Which of the following captions best describes this image?
A. A woman applying makeup in front of a mirror
B. A person taking a photo with a camera
C. A group of people watching a movie in a theater
D. A person reading a book in a library

A woman applying makeup in front of a mirror.
A person reading a book in a library.
A group of people watching a movie in a theater.
A person taking a photo with a camera. The answer is A.

A woman applying makeup in front of a mirror

A group of people watching a movie in a theater


Prompt:
Which of the following captions best describes this image?
A. A woman doing yoga in a park
B. A person swimming in a pool
C. A group of people sunbathing on a beach
D. A person skiing down a mountain

A person swimming in a pool.
This caption describes the person in the picture. The answer is B.


Prompt:
Which of the following captions best describes this image?
A. A woman doing yoga in a park
B. A person swimming in a pool
C. A group of people sunbathing on a beach
D. A person skiing down a mountain

A woman doing yoga in a park.
The caption is A.


Prompt:
Which of the following captions best describes this image?
A. A woman doing yoga in a park
B. A person swimming in a pool
C. A group of people sunbathing on a beach
D. A person skiing down a mountain

A person skiing down a mountain.
The colorful object in the foreground is a skiier's equipment. The answer is D.


Prompt:
Which of the following captions best describes this image?
A. A woman doing yoga in a park
B. A person swimming in a pool
C. A group of people sunbathing on a beach
D. A person skiing down a mountain

A woman doing yoga in a park.
A person doing yoga in a park.
A group of people sunbathing on a beach.
A person skiing down a mountain. The answer is A.


Prompt:
Which of the following captions best describes this image?
A. A person rock climbing on a mountain
B. A group of people camping in a forest
C. A person riding a horse in a field
D. A woman fishing on a riverbank

The caption is a sentence that tells you about the picture. When you look at a picture, try to figure out what the caption is telling you.
Here are some examples of captions:
My sister and I in front of our house.
A picture of the sunset over the ocean.
A ballerina standing on stage.
A picture of my dog Luca running. The answer is B.


Prompt:
Which of the following captions best describes this image?
A. A person rock climbing on a mountain
B. A group of people camping in a forest
C. A person riding a horse in a field
D. A woman fishing on a riverbank

A person riding a horse in a field.
The caption is C.


Prompt:
Which of the following captions best describes this image?
A. A person rock climbing on a mountain
B. A group of people camping in a forest
C. A person riding a horse in a field
D. A woman fishing on a riverbank

The subject of an image is the person or thing that the image is about. Look at the image.
The caption should describe the subject of the image. In this case, the caption should describe the woman fishing.
The answer is D.


Prompt:
Which of the following captions best describes this image?
A. A person rock climbing on a mountain
B. A group of people camping in a forest
C. A person riding a horse in a field
D. A woman fishing on a riverbank

The subject of the image is a person rock climbing on a mountain. The answer is A.


Prompt:
Which of the following captions best describes this image?
A. A person practicing martial arts in a studio.
B. A person skateboarding in a skatepark
C. A group of people playing basketball on a court.
D. A woman doing gymnastics on a balance beam.

A person skateboarding in a skatepark.
The person is doing a flip trick on a skateboard. This type of trick is done by flipping the board in the air. The answer is B.

A person practicing martial arts in a studio.

A group of people playing basketball on a court.

A woman doing gymnastics on a balance beam.


Prompt:
Which of the following captions best describes this image?
A. A person practicing martial arts in a studio.
B. A person skateboarding in a skatepark
C. A group of people playing basketball on a court.
D. A woman doing gymnastics on a balance beam.

A group of people playing basketball on a court.
A person practicing martial arts in a studio.
A woman doing gymnastics on a balance beam.
A person skateboarding in a skatepark. The answer is C.

A person practicing martial arts in a studio.

A group of people playing basketball on a court.

A woman doing gymnastics on a balance beam.


Prompt:
Which of the following captions best describes this image?
A. A person practicing martial arts in a studio.
B. A person skateboarding in a skatepark
C. A group of people playing basketball on a court.
D. A woman doing gymnastics on a balance beam.

A person doing gymnastics on a balance beam is described by the caption D. The answer is D.

A person practicing martial arts in a studio.

A group of people playing basketball on a court.

A woman doing gymnastics on a balance beam.


Prompt:
Which of the following captions best describes this image?
A. A person practicing martial arts in a studio.
B. A person skateboarding in a skatepark
C. A group of people playing basketball on a court.
D. A woman doing gymnastics on a balance beam.

A person practicing martial arts in a studio.
A martial artist wears a uniform and practices self-defense techniques. The answer is A.

A person practicing martial arts in a studio.

A group of people playing basketball on a court.

A woman doing gymnastics on a balance beam.


Prompt:
Which of the following captions best describes this image?
A. A person taking photographs of a cityscape.
B. A person painting a landscape on a canvas.
C. A group of people watching a play in a theater.
D. A woman sculpting a statue from clay.

A group of people watching a play in a theater.
Theater audiences sit in rows behind the stage. The answer is C.

A person taking photographs of a cityscape.

A person painting a landscape on a canvas.

A group of people watching a play in a theater.


Prompt:
Which of the following captions best describes this image?
A. A person taking photographs of a cityscape.
B. A person painting a landscape on a canvas.
C. A group of people watching a play in a theater.
D. A woman sculpting a statue from clay.

A person sculpting a statue from clay.
The word sculpting describes the process of forming a statue from clay. The answer is D.

A person taking photographs of a cityscape.

A person painting a landscape on a canvas.

A group of people watching a play in a theater.


Prompt:
Which of the following captions best describes this image?
A. A person reading a magazine on a couch.
B. A person playing video games on a console.
C. A group of people playing cards at a table.
D. A woman using a computer at a desk.

A woman using a computer at a desk.
The caption is D.

A person playing video games on a console.

A group of people playing cards at a table.