Prompt:
Which category does this image belong to?
A. sketch
B. digital art
C. photo
D. oil painting

A category is a group of things that share one or more traits.
When you look at a group of things, you can often tell which category they belong to by observing the traits they have in common. Category names are used to identify groups of things.
Sometimes, people invent new categories for things that do not fit into existing categories. When that happens, the new category gets a name and is added to the list of categories.
To decide which category an image belongs to, ask yourself which categories include images that were created in the same way.
For example, paintings and drawings belong to the category art. Photographs and videos belong to the category media. Look at the categories in the list, and decide which ones include images that were created in the same way.
Oil paintings are created by painting with oil paint. The answer is D.


Prompt:
Which category does this image belong to?
A. sketch
B. digital art
C. photo
D. oil painting

A category is a group of things that share common characteristics.
When you look at a group of things, you can put them into categories based on their characteristics. This process is called classification. Look at the image.
The image is a photo of a woman taking a picture of a city skyline at night.
Photos can be classified into different categories based on how they are taken. For example, a photo of a dog running on a beach would be classified as a sports photo. A photo of a flower would be classified as a still life photo. This photo is classified as a digital art photo.
The answer is B.


Prompt:
Which category does this image belong to?
A. sketch
B. digital art
C. photo
D. oil painting

A category is a group of things that share common characteristics.
When you look at a group of things, you can often tell which category they belong to. To do this, you need to examine the characteristics of each category. Then, you can decide which category a certain thing belongs to based on its characteristics.
For example, you know that a picture of a cat belongs to the category of animals because cats have fur and walk on four legs. The tree in the image belongs to the category of plants. The answer is A.


Prompt:
Which category does this image belong to?
A. photo
B. painting
C. map
D. remote sense image

Remote sense images are taken from space. The answer is D.


Prompt:
Which category does this image belong to?
A. photo
B. painting
C. map
D. remote sense image


Prompt:
Which category does this image belong to?
A. photo
B. painting
C. map
D. remote sense image

A category is a group of things that share common characteristics.
Artists use different techniques to create their paintings.
Some paintings are of real objects.
Other paintings are of imaginary objects.
Still other paintings are of places or things that don't exist.
Mapper's draw maps and globes.
They use different techniques to show different parts of the world.
One technique is to color different parts of the map.
Blue shows lakes and rivers.
Green shows forests.
Blue shows world maps.
Green shows globes. The answer is C.


Prompt:
Which category does this image belong to?
A. photo
B. painting
C. map
D. remote sense image

Remote sense images are images that are gathered by sensors that are mounted on aircraft or spacecraft. The images can show different parts of Earth's surface, and they can be used for many different purposes.
Map showing the boundaries of a geographic region is called a political map.
This type of map uses different colors, shades, or patterns to show different regions.
Political maps can be divided into four categories:
o Council maps show the boundaries of cities or towns.
o Administrative maps show the boundaries of governing regions, such as states or provinces.
o Special-purpose maps show specific things about an area, such as roads or rivers.
o Thematic maps show patterns or relationships in the data.
The answer is C.


Prompt:
Which category does this image belong to?
A. 8-bit
B. digital art
C. painting
D. medical CT image

An image belongs to a category based on what you can tell about it by looking at it.
You can usually tell what a picture is about by looking at it. Category names often contain words such as landscape, portrait, still life, and abstract. Looking at an image, try to tell what the category is.
If you're having trouble deciding on a category, try looking at other pictures in that category. Also, category names often contain words that describe the artwork. Look at the words in the category name, and try to tell if the picture fits those words. The category 8-bit is out.
This image is a digital art. The answer is B.


Prompt:
Which category does this image belong to?
A. 8-bit
B. digital art
C. painting
D. medical CT image

The answer is A.


Prompt:
Which category does this image belong to?
A. 8-bit
B. digital art
C. photo
D. medical CT image

Medical CT images are made up of many pixels, or small pieces of information. The answer is D.


Prompt:
Which category does this image belong to?
A. 8-bit
B. digital art
C. photo
D. medical CT image

Medical CT images are captured by a computed tomography scanner, which uses X-rays to create detailed images of the body.
When X-rays pass through the body, they may be absorbed by different parts of the body. The absorption of X-rays by different parts of the body depends on the density of the parts.
Dense parts of the body absorb most of the X-rays. So, CT scans are able to image dense parts of the body much better than soft tissues. As a result, CT scans are very good at imaging bones and some soft tissues, such as the heart and lungs.
CT scans of the abdomen and pelvis show the liver, pancreas, and other organs in the abdomen.
CT scans of the chest show the lungs and heart. In the past, only hospitals and doctors' offices had CT scanners. But today, CT scanners are also being used in some specialty clinics and imaging centers. The answer is D.


Prompt:
what style is depicted in this image?
A. post-Impressionism
B. modernism
C. dadaism
D. impressionism

Impressionism is a style of painting that started in France in the mid-19th century. Impressionist paintings often feature landscapes, cities, or everyday scenes.
The impressionists were not a group of artists who worked together. They were not part of a political movement or a secret society. But the impressionists shared certain ideas about art. They wanted to capture the changing appearance of light. They were interested in depicting realistic scenes. But they used unconventional techniques and bright colors in their paintings.
During the mid-19th century, the impressionists began to show their work in groups of artists called exhibitions. The exhibitions helped make the impressionist style known to a wider audience. Sunset on the Pont-Neuf, shown here, is an impressionist painting. The answer is D.


Prompt:
what style is depicted in this image?
A. post-Impressionism
B. modernism
C. dadaism
D. impressionism

Impressionism is a style of painting that started in France in the mid-19th century. Impressionist paintings often feature landscapes or cityscapes with a lot of light and color.
During the Impressionist period, artists started using new techniques to paint light. They used thin paint layers to create the appearance of light reflecting off of surfaces. Artists also used vibrant colors and quickly painted scenes from nature.
The style of a work of art is its overall look and feel. This style is carried out through choices about how to paint or create art.
Style is often used to categorize works of art. Artists who work in a similar style are often called school or movement artists. The answer is D.


Prompt:
what style is depicted in this image?
A. post-Impressionism
B. modernism
C. dadaism
D. impressionism

Impressionism is a style of painting that originated in France in the mid-19th century. Impressionist paintings are known for their use of light and for capturing moments of daily life.
The Impressionists were not the first artists to paint landscapes or to use light effectively. But they were the first to do both things in a new way. They painted landscapes in open air, using quickly dried paints. And they used light in a new way. They let in light that was unusual and gave the paintings a bright, open feeling. The answer is D.


Prompt:
what style is depicted in this image?
A. post-Impressionism
B. modernism
C. dadaism
D. impressionism

Impressionism is a style of painting that emphasizes open, imprecise brushstrokes and a naturalistic depiction of light.
The impressionists sought to record the changing appearance of light at different times of the day and in different seasons. They also wanted to capture the fleeting moments of daily life.
In contrast to the rigid techniques and dark, somber colors of the old masters, the impressionists used bright, open colors and thin, dotted brushstrokes to create the appearance of sparkling light. The answer is D.


Prompt:
what style is depicted in this image?
A. post-Impressionism
B. modernism
C. dadaism
D. impressionism

Impressionism is a style of painting that started in France in the mid-19th century. Impressionist paintings often feature landscapes or cityscapes with open spaces and natural light.
The style is known for using bold, vivid colors and for capturing moments of light. Impressionist artists often paint scenes that are taken from life, and they try to record the natural appearance of scenes. This style is called realism.
Paul Cézanne was an impressionist painter who continued to work in this style even after the impressionist movement had ended. His paintings of landscapes and still lifes are often considered to be the beginning of modern art.
Dadaism is a style of art that began in Europe during World War I. Artists who worked in the dadaist style used irrationality and nonsense in their art.
The word dada means "hobby horse," a children's toy. A hobby horse is a toy horse that a child can ride. The answer is D.


Prompt:
what style is depicted in this image?
A. post-Impressionism
B. modernism
C. dadaism
D. impressionism

Images have different styles. A style is a set of rules that an artist follows to make his or her pictures look like those of other artists in the same style.
Style is often determined by the time period in which an artist lives. For example, an artist might use a style from the Renaissance if he or she lives in the Renaissance time period. Or an artist might use a style from the 1950 s if he or she lives in the 1950 s.
Look at the image.
This image is covered in words and phrases from magazines and books. The answer is D.


Prompt:
what style is depicted in this image?
A. post-Impressionism
B. modernism
C. dadaism
D. impressionism

Images have different styles. A style is a set of methods and techniques that an artist uses to create an image.
Style is shown through the choices of subject matter, composition, color, and technique. Image copyrights use to describe an image's style, and they often include the word style.
Style also describes the overall look of an image. For example, a landscape image will have a different style than a portrait image. Look at the image.
The style of this image is impressionism. The artist used a soft-focus technique to create the image. The answer is D.


Prompt:
what style is depicted in this image?
A. post-Impressionism
B. modernism
C. dadaism
D. impressionism

Images have different styles. A style is a set of rules that an artist follows to make his or her pictures look like those of other artists in the same style.
Style is often determined by the time period in which an artist lives. The styles of ancient artists are different from those of artists living in the last hundred years. The style of an artist represents the artist's view of the world. Look at the picture.
The style of the image is dadaism. Dadaists used absurdity and irony in their art. They protested against war and death by making art that appeared to reject value judgments. The answer is C.


Prompt:
Which category does this image belong to?
A. icon
B. microscopic image
C. abstract painting
D. MRI image

An icon is a picture that represents something else.
Icons can make things in your phone, computer, and other devices easier to find.
Look at the image.
This image shows a MRI (magnetic resonance imaging) scan of a person's brain.
MRI scans are pictures of the inside of the body. They can show details that are hard to see with other types of images. The answer is D.


Prompt:
Which category does this image belong to?
A. icon
B. microscopic image
C. abstract painting
D. MRI image

This category includes images that are recognizable as objects or scenes.
Abstract paintings are works of art that do not represent anything in the world. They use color and shape to create a unique image that has no one-to-one correspondence with the world.
Iconic images are objects that can be recognized easily. They may be logos, emblems, or other designs that are recognizable even when scaled up or down.
Microscopic images are images of objects that can only be seen through a microscope.
This category includes images of cells, viruses, and other microscopic organisms. The answer is D.


Prompt:
Which category does this image belong to?
A. icon
B. microscopic image
C. abstract painting
D. MRI image

This category is abstract painting. The answer is C.


Prompt:
Which category does this image belong to?
A. icon
B. microscopic image
C. abstract painting
D. MRI image

This category is icon.
An icon is a picture that represents something else. Icons can make things in your story easier to understand without the use of words. They can also help to make a story more interesting. The answer is A.


Prompt:
Which category does this image belong to?
A. icon
B. microscopic image
C. abstract painting
D. MRI image

This category includes images that are widely recognized as symbols, emblems, or motifs.
An icon is a graphic representation that is easily recognizable as itself.
The flag of the United States is an icon.
A motif is a pattern or theme that appears frequently in a writer's or artist's work.
Victorian-era houses are a motif in the work of author Jane Austen.
An abstract painting is a work of art that does not represent anything from the world around.
An impressionistic painting of a sunset is an abstract painting. The answer is A.


Prompt:
Which category does this image belong to?
A. icon
B. microscopic image
C. abstract painting
D. MRI image

This category is abstract painting.
Why?
The image is a painting. It is made with color.
An icon is a picture that represents something else.
The heart symbol shows that this image is about the heart.
A microscopic image is made on a very small scale.
This image is not made on a very small scale. The answer is C.


Prompt:
Which category does this image belong to?
A. icon
B. microscopic image
C. abstract painting
D. MRI image


Prompt:
what style is this painting?
A. watercolor painting
B. gouache painting
C. pen and ink
D. ink wash painting

A style is a set of techniques and ideas that an artist uses to make his or her paintings.
Certain styles are used to depict different subject matter. For example, a style that makes objects look realistic is called a representational style. A style that uses bold colors and thick lines is called an abstract style.
Certain styles are used to make paintings look more modern or old-fashioned. For example, a style that uses bright colors and clear, simple lines looks more modern. A style that uses dark, bold colors and old-fashioned subject matter looks more old-fashioned. This painting is an ink wash painting. Ink wash is a style of painting where the artist uses ink to create a wash, which is a thin coating of ink.
The answer is D.


Prompt:
what style is this painting?
A. watercolor painting
B. gouache painting
C. pen and ink
D. ink wash painting

A style is a set of techniques and approaches used by artists. Style can vary depending on the era, location, and personal preferences of an artist.
The style of a painting is determined by its techniques and approaches. Watercolor, gouache, pen and ink, and ink wash are all techniques that artists use to paint.
The answer is D.


Prompt:
what style is this painting?
A. watercolor painting
B. gouache painting
C. pen and ink
D. ink wash painting

A style is a set of techniques and approaches used by artists.
A painting's style can be used to determine the date it was created.
Artists' styles change over time, and artists often mix styles from different periods. This painting is an ink wash painting. It was done with a ink wash, which is a type of watercolor paint.
A ink wash is a thin coat of ink that covers a surface. Compare the answer with the choice. The answer is D.


Prompt:
what style is this painting?
A. watercolor painting
B. gouache painting
C. pen and ink
D. ink wash painting

A style is the way an artist paints. Watercolor, gouache, pen and ink, and ink wash are different styles.
An artist's style tells you how his or her paintings look. Style depends on the methods and materials an artist uses. Look at the details of the painting to figure out its style.
Ink wash paintings use ink that has been mixed with water. The ink flows and spreads across the paper. This painting uses ink wash.
The ink wash makes the painting look like a watercolor. But the ink wash does not change the way the painting looks like a photograph. So, this painting is an ink wash painting. The answer is D.


Prompt:
what style is this painting?
A. watercolor painting
B. gouache painting
C. pen and ink
D. ink wash painting

A style is a set of techniques and approaches used by an artist.
Different styles can be used to create different effects. For example, a sketchy style can be used to make something look quick and spontaneous, while a smooth style can be used to make something look professional.
Look at the image.
The painting is done in ink wash.
Ink wash is a style of painting where ink is washed over a piece of paper to create a soft, blended effect.
The answer is D.


Prompt:
what style is this painting?
A. watercolor painting
B. gouache painting
C. pen and ink
D. ink wash painting

A style is a set of techniques and ideas that artists use to make their paintings.
Style can affect how a painting looks and feels. For example, a painting in the style of the Renaissance might show people looking toward the center of the picture. Renaissance paintings often did not show people looking at each other.
Style can also affect how a painting is made. For example, a painting in the style of the Impressionists might be painted with broad strokes. Impressionist paintings often have a loose, sketchy quality. To help you describe a painting's style, look at the painting itself.
What can you tell about the style of the painting?
The painting is a watercolor painting.
Watercolor paintings are made with colors that are lighter in color. The answer is A.


Prompt:
what style is this painting?
A. watercolor painting
B. gouache painting
C. pen and ink
D. ink wash painting

A style is a set of techniques and ideas that artists use to make their paintings.
Certain styles are used to depict different subject matter. For example, a landscape painter might use a different style than a painter of still lifes.
Other styles are used to make paintings look more old-fashioned. For example, a painter might use a style from the Renaissance, which is a style from the time of Leonardo da Vinci.
Styles can also be used in combination. An artist might use a style from the Renaissance to paint a modern-day landscape. Or, an artist might use a bold, expressive style to paint a portrait. Look at the details of the painting.
The painting is done in gouache, which is a opaque watercolor. Gouache paintings often have a flat look because the paint dries quickly.
The answer is B.


Prompt:
what python code is gonna generate the result as shown in the image?
A. if 5 > 2:
print("Five is greater than two!")
if 5 > 2:
print("Five is greater than two!")
B. #This is a comment.
print("Hello, World!")
C. if 5 > 2:
print("Five is greater than two!")
D. if 5 > 2:
print("Five is greater than two!")
print("Five is greater than two!")

A condition is a test that determines whether a block of code should be executed.
The code inside a block will not be executed unless the condition is true.
An if statement is a condition that tests a value and executes a block of code if the condition is true.
The code inside the if block will be executed at most once, regardless of how often the if statement is executed.
For example, consider the following if statement:
if x > y:
print("x is greater than y")
If the condition is true, the code inside the if block will be executed. So, the output will be "x is greater than y".
The greater than symbol (>) is a comparison operator. It compares two values and returns true if the first value is greater than the second value.
5 > 2 is true, so the output is "Five is greater than two!". The answer is D.

if 5 > 2:
print("Five is greater than two!")
if 5 > 2:
print("Five is greater than two!")

#This is a comment.
print("Hello, World!")

if 5 > 2:
print("Five is greater than two!")

if 5 > 2:
print("Five is greater than two!")
print("Five is greater than two!")


Prompt:
what python code is gonna generate the result as shown in the image?
A. thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1965
}
print(thisdict["brand"])
B. thisdict = {
"brand": "Ford",
"electric": False,
"year": 1965,
"colors": ["red", "white", "blue"]
}

print(thisdict)
C. thisdict = dict(name = "John", age = 37, country = "Norway")

print(thisdict)
D. thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1965
}
print(thisdict)

The result is shown in the image.
 To generate this result, the Python code below must be executed:
    thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1965
}
print(thisdict["brand"])
The answer is A.

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1965
}
print(thisdict["brand"])

thisdict = {
"brand": "Ford",
"electric": False,
"year": 1965,
"colors": ["red", "white", "blue"]
}

print(thisdict)

thisdict = dict(name = "John", age = 37, country = "Norway")

print(thisdict)

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1965
}
print(thisdict)


Prompt:
what python code is gonna generate the result as shown in the image?
A. thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1966
}
print(thisdict["brand"])
B. thisdict = {
"brand": "Ford",
"electric": False,
"year": 1966,
"colors": ["red", "white", "blue"]
}

print(thisdict)
C. thisdict = dict(name = "John", age = 38, country = "Norway")

print(thisdict)
D. thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1966
}
print(thisdict)

The result is shown in the image.
The code that generated this result is shown in capital letters. The answer is A.

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1966
}
print(thisdict["brand"])

thisdict = {
"brand": "Ford",
"electric": False,
"year": 1966,
"colors": ["red", "white", "blue"]
}

print(thisdict)

thisdict = dict(name = "John", age = 38, country = "Norway")

print(thisdict)

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1966
}
print(thisdict)


Prompt:
what python code is gonna generate the result as shown in the image?
A. thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1967
}
print(thisdict["brand"])
B. thisdict = {
"brand": "Ford",
"electric": False,
"year": 1967,
"colors": ["red", "white", "blue"]
}

print(thisdict)
C. thisdict = dict(name = "John", age = 39, country = "Norway")

print(thisdict)
D. thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1967
}
print(thisdict)

A dictionary is a collection of key-value pairs. The values can be of any data type, including other dictionaries.
Dictionaries can be created using curly braces with key-value pairs separated by commas. Each pair represents a different item in the dictionary.
For example, the dictionary below has three items:
"apple" : 3
"banana" : 5
"orange" : 7
To set a value for a key, use the = sign.
For example, the dictionary below sets the value of the key "banana" to 7.
"banana" : 7
To print a dictionary, use the print() function. The print() function will display the keys and values in the dictionary.
For example, the dictionary below will print the keys and values.
"apple" : 3
"banana" : 7
"orange" : 5
To update a dictionary, you can add or remove key-value pairs.
For example, the dictionary below is updated by adding the key "pear" and the value 2.
"apple" : 3
"banana" : 7
"orange" : 5
"pear" : 2
The code in the result is a dictionary. Each key in the dictionary is followed by a colon and a value.
The values in this dictionary are "Ford", 1967, and "blue". The answer is D.

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1967
}
print(thisdict["brand"])

thisdict = {
"brand": "Ford",
"electric": False,
"year": 1967,
"colors": ["red", "white", "blue"]
}

print(thisdict)

thisdict = dict(name = "John", age = 39, country = "Norway")

print(thisdict)

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1967
}
print(thisdict)


Prompt:
what python code is gonna generate the result as shown in the image?
A. fruits = ["apple", "banana", "cherry"]
for x in fruits:
print(x)
if x == "banana":
break
B. fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
break
print(x)
C. fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)
D. for x in "banana":
print(x)

For each question, choose the answer that is the best solution.
This is a loop. The code inside the loop will be executed repeatedly as long as the condition is true. In this case, the loop will print out the values in the fruits list. The answer is A.

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

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

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


Prompt:
what python code is gonna generate the result as shown in the image?
A. fruits = ["apple", "banana", "cherry"]
for x in fruits:
print(x)
if x == "banana":
break
B. fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
break
print(x)
C. fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)
D. for x in "banana":
print(x)

For each question, choose the answer that is the best solution.
This is a simple code. It prints the name of each fruit to the console. The answer is A.

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

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

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


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 __str__(self):
return f"{self.name}({self.age})"

p1 = Person("John", 36)

print(p1)
B. 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()
C. 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)
D. fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)

A class is a user-defined data type. It is a template for creating objects. An object is an instance of a class.
Here is the code for the class Person:
```
class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age
```
The `__init__` method is the constructor for the class. It takes two parameters: `name` and `age`.
The `name` parameter is a string. It represents the name of the person.
The `age` parameter is an integer. It represents the age of the person.
The `str` method is a special method. It does not take any parameters.
A class can have one or more special methods.
The `len` method is a special method. It takes no parameters.
The `max` method is a special method. It takes one parameter: a list.
If the list is not empty, the `max` method returns the element at the index 0 of the list. If the list is empty, the `max` method returns the maximum value in the list.
The `min` method is a special method. It takes one parameter: a list.
If the list is not empty, the `min` method returns the element at the index 0 of the list. If the list is empty, the `min` method returns the minimum value in the list. The answer is A.

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()

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)


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 __str__(self):
return f"{self.name}({self.age})"

p1 = Person("John", 36)

print(p3)
B. 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()
C. 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)
D. fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)

A class is a user-defined data type. It is a template for creating objects. An object is an instance of a class.
Here is the code for the class Person:
```ruby
class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age
```
The `__init__` method is the constructor for the class. It takes two parameters: `name` and `age`.
The `name` parameter is a string. It represents the person's name.
The `age` parameter is an integer. It represents the person's age.
The `name` and `age` parameters are used to initialize the instance variables `name` and `age`.
The `Person` class has a default value for the `age` parameter. You can use this default value when you create a new instance of the `Person` class.
For example, `p1 = Person("John", 36)` creates a new instance of the `Person` class with the name "John" and the age 36.
The `str` method is a special method. It does not take any parameters.
A class can have one or more `str` methods. The `str` method for a class returns a string representation of the class.
For example, `Person` is a class with a `str` method. The string representation of the `Person` class is returned by the `str` method when you use the `str` function on a `Person` object.
The other methods in the `Person` class are not shown here. The `print` function is used to print a string.
For example, `print(p3)` prints the string "John(36)". The answer is A.

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()

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)


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

JavaScript Functions

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

B. <!DOCTYPE html>

JavaScript Functions

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

C. <!DOCTYPE html>

JavaScript Functions

Using a function as a variable:

D. <!DOCTYPE html>

JavaScript Functions

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

A.  <!DOCTYPE html>

JavaScript Functions

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

 The answer is A.

<!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:

<!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:


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

JavaScript Objects

There are two different ways to access an object property.

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

B. <!DOCTYPE html>

JavaScript Objects

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

C. <!DOCTYPE html>

JavaScript Objects

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

D. <!DOCTYPE html>

JavaScript Objects

A.

What code would generate this webpage in the browser?

There are four possible outcomes for an HTML document:

1. If the document is saved as UTF-8, it will be saved with the .html extension.
2. If the document is saved as something other than UTF-8, it will be saved with the .htm extension.
3. If the document is opened in the browser, the browser will display the HTML.
4. If the document is opened in a text editor, the text editor will display the HTML.
To run the code in the HTML file, copy it from the file and paste it into the script tag in the HTML file. Then, open the HTML file in the browser. The answer is A.

<!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.

<!DOCTYPE html>

JavaScript Objects

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


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

JavaScript Objects

There are two different ways to access an object property.

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

B. <!DOCTYPE html>

JavaScript Objects

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

C. <!DOCTYPE html>

JavaScript Objects

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

D. <!DOCTYPE html>

JavaScript Objects

A.

What code would generate this webpage in the browser?

There is one correct answer.

B.

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

The answer is B.

<!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.

<!DOCTYPE html>

JavaScript Objects

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


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, 4, 3]
list2 = ['one', 'two', 'three']
print(list_to_dictionary(list1, list2))
B. 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))
C. 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))
D. 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)) The answer is B.

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))

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))


Prompt:
Which Python code can generate the content of the image?
A. a, b = 1,0
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block")
B. a, b = 1,0
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("block")
C. a, b = 1,2
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block")
D. a, b = 1,1
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally 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 should end with a semicolon.
The first line of a code block is the line where the instructions start. This line should not end with a semicolon. The rest of the lines in the code block end with semicolons.
Here is a code block that contains instructions for adding two numbers:
Trying to divide a number by zero will raise a ZeroDivisionError. The error message will contain the word "zero" or "divide".
The content of the image can be generated by the following Python code:
a, b = 1,0
try:
print(a/b)
except ZeroDivisionError:
print("Can not divide by zero")
finally:
print("Executing finally block") The answer is B.

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")

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")


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

A Python list is a collection of values, or items. You can use a list to store words, numbers, or other data.
To create a list, you can use square brackets with items separated by commas. For example:
numbers = [1, 2, 3, 4, 5]
words = ["hello", "goodbye", "hi"]
You can also create a list by copying values from other lists. For example:
numbers = [1, 2, 3, 4, 5]
squares = numbers
squares = [x**2 for x in numbers]
The product of a number and 100 is 100. The sum of the numbers from 1 to 10 is 55. The answer is D.

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

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

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

list = ["Hello", "world", "Ok", "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('strawberry')
print(result)
B. from collections import Counter
result = Counter('banana')
print(result)
C. from collections import Counter
result = Counter('apple')
print(result)
D. from collections import Counter
result = Counter('Canada')
print(result)

From the given code, you can tell that the content of the image is a string. This string is "apple".
The code that generates this string is:
result = Counter('apple')
print(result)
The answer is C.

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

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

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

from collections import Counter
result = Counter('Canada')
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 + 1

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

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

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

print "Good bye!"

To generate the content of the image, use the Python code given below. It counts from 0 to 9 and prints each count.
count = 0
while (count < 9):
print 'The count is:', count
count = count + 1
The answer is A.

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!"

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!"


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 + 1
else:
print count, " is not less than 5"
B. count = 0
while count < 5:
print count, " is less than 5"
count = count + 1
else:
print count, " is not less than 6"
C. count = 0
while count < 5:
print count, " is less than 5"
count = count + 2
else:
print count, " is not less than 5"
D. count = 1
while count < 5:
print count, " is less than 5"
count = count + 1
else:
print count, " is not less than 5"

Each line of code in the image generates one word in the output. The words in the output are "is less than 5" 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 content "is less than 5" and "is not less than 5". The answer is A.

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"

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"


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

The content of the image is a list containing three strings: 'Baidu', 'Runoob', and 'Google'.
The Python code in each answer choice generates this list. The answer is D.

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

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

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

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


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

Each line in the code represents a value in the list. The values are separated by commas. The list contains four values.
The first value is 'physics'. The second value is 'chemistry'. The third value is 1997. The fourth value is 2000.
The print statement will display the contents of the list. The answer is B.

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

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


Prompt:
Which Python code can generate the content of the image?
A. 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]
B. 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]
C. 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]
D. 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]

The code can be written in Python.
Instead of using a tuple to store the elements of a list, you can use a list to store the elements of a tuple. Lists and tuples are both special types of sequences. A sequence is a collection of elements that can be accessed by an index.
To create a list from a tuple, you can use the list() function. To create a tuple from a list, you can use the tuple() function.
Tuples and lists have different methods. A method is a special function that can be called on an object.
For example, the len() method can be called on a list to get its length. The count() method can be called on a tuple to get the number of elements it contains.
To print a list or a tuple, you can use the print() function. The print() function will print the contents of the list or the tuple.
To iterate over the elements of a list or a tuple, you can use the for loop. The for loop will execute the code in the loop body for each element in the list or the tuple.
To iterate over the elements of a tuple in reverse order, you can use the reverse() method. The reverse() method changes the order of the elements in the tuple. Then, the for loop will iterate over the elements of the tuple in reverse order.
To iterate over the elements of a list in reverse order, you can use the reverse() method and the for loop. The reverse() method changes the order of the elements in the list. Then, the for loop will iterate over the elements of the list in reverse order.
To iterate over the elements of a tuple that are within a certain range, you can use slicing. The slice() function can be used to get a portion of a tuple.
To iterate over the elements of a list that are within a certain range, you can use slicing. The slice() function can be used to get a portion of a list.
To iterate over the elements of a tuple that are within a certain range and print them, you can use the print() function. The code can be written in Python.
Instead of using a tuple to store the elements of a list, you can use a list to store the elements of a tuple. Lists and tuples are both special types of sequences. A sequence is a collection of elements that can be accessed by an index.
To create a list from a tuple, you can use the list() function. To create a tuple from a list, you can use the tuple() function.
Tuples and lists have different methods. A method is a special function that can be called on an object.
For example, the len() method can be called on a list to get its length. The count() method can be called on a tuple to get the number of elements it contains.
To print a list or a tuple, you can use the print() function. The print() function will print the contents of the list or the tuple. The answer is D.


Prompt:
Which Python code can generate the content of the image?
A. counter = 100
miles = 1000.0
name = "Gary"
print counter
print miles
print name
B. counter = 100
miles = 1000.0
name = "John"
print counter
print miles
print name
C. counter = 110
miles = 1000.0
name = "John"
print counter
print miles
print name
D. counter = 100
miles = 1001.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 = "Gary"
print counter
print miles
print name
The answer is A.

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

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


Prompt:
Which Python code can generate the content of the image?
A. print str
print str[1]
print str[2:5]
print str[2:]
print str * 2
print str + "TEST"
B. print str
print str[0]
print str[1:5]
print str[2:]
print str * 2
print str + "TEST"
C. print str
print str[0]
print str[2:5]
print str[3:]
print str * 2
print str + "TEST"
D. 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"
The content of the image is:
Hello World!
The Python code that generates this content is:
print strHello World!The answer is A.

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"

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"


Prompt:
Which Python code can generate the content of the image?
A. 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
B. 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
C. 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
D. 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

A code generator is a program that generates code.
What does a code generator do?
A code generator takes code that is written in a high-level language and turns it into lower-level code that a computer can execute.
How does a code generator do this?
There are different ways a code generator can turn high-level code into lower-level code. One way is to examine the high-level code and remove the parts that are not necessary to execute the code. For example, if the high-level code uses a function that is not in the lower-level language, the code generator can remove that function from the lower-level code.
Another way a code generator can turn high-level code into lower-level code is to add code to the high-level code. For example, if the high-level code uses a feature of the language that is not available in the target computer's operating system, the code generator can add code to emulate that feature.
Some code generators can generate entire programs. Other code generators can generate only parts of a program.
A code generator can generate code for a specific target. For example, a code generator might generate code that can be executed on a specific type of computer.
Code generators can also generate code that can be executed on multiple types of computers. This kind of code generator is called a cross-compiler. The answer is A.

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

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


Prompt:
Which Python code can generate the content of the image?
A. 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()
B. 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()
C. 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()
D. 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()

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 a new key-value pair to a dictionary, use the dict.update() method.
To remove a key-value pair from a dictionary, use the dict.pop() method.
To get a value from a dictionary, use the dict[key] method.
To check if a dictionary contains a key, use the dict.has_key() method.
To iterate over all the key-value pairs in a dictionary, use a for loop. The answer is B.

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()

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()


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

The content of the image is the result of matching web addresses that contain the substring www with web addresses that contain the substring com.
You can use the Python function re.match() to match patterns in strings. The match function returns a MatchObject containing the matched string. You can use the span() method of the MatchObject to extract the matched text.
The following code matches web addresses that contain the substring www with web addresses that contain the substring com. It prints the matched text and the number of matches.
Import the re module.
Print the result of matching web addresses that contain the substring www with web addresses that contain the substring com. The answer is D.

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'))

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'))


Prompt:
Which Python code can generate the content of the image?
A. 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!!"
B. 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!!"
C. 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!!"
D. 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!" The answer is A.

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!!"

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"


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 * 3)
s = 'A23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s))
B. import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'A23G4HFD568'
print(re.sub('(?P<value>\d+)', double, s))
C. import re
def double(matched):
value = int(matched.group('value'))
return str(value * 2)
s = 'B23G4HFD567'
print(re.sub('(?P<value>\d+)', double, s))
D. 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)) The answer is A.

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))

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))


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

There are two ways to generate the content of the image:
1. import re
result = re.findall(r'(\w+)=(\d+)', 'set width=20 and height=10')
print(result)
2. import re
result = re.findall(r'(\w+)=(\d+)', 'set width=30 and height=10')
print(result)
The first line of code imports the re module.
The second line of code uses the re.findall() function to find all of the matches for the pattern '(\w+)=(\d+)'. The pattern matches any sequence of one or more word characters followed by an equal sign and any sequence of digits. The function returns a list of all of the matches.
The third line of code prints the list of matches.
The result is set to the list of matches.
The first set of matches is 'width=20 and height=10'. The answer is D.

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)

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)


Prompt:
Which Python code can generate the content of the image?
A. import re
content = dir(math)
print content
B. import numpy
content = dir(math)
print content
C. import math
content = locals(math)
print content
D. import math
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 current scope, and then printing them.
Here is the generated code:
import math
content = locals(math)
print content
The output will be:
[math.pi, math.cosh, math.degrees, math.pow, math.freq]

import re
content = dir(math)
print content

import numpy
content = dir(math)
print content

import math
content = locals(math)
print content

import math
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 'nothing'
B. flag = False
name = 'lemon'
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 name
D. flag = False
name = 'lumen'
if name == 'python':
flag = True
print 'welcome boss'
else:
print name

This code can generate the content of the image:
```python
flag = False
name = 'luren'
if name == 'python':
    flag = True
    print 'welcome boss'
else:
    print name
```
The output of this code is:
```css
welcome boss
``` The answer is C.

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

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


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

You can use the % operator to format strings in Python.
The % operator can be used in two ways:
To replace placeholders in a string with actual values.
To calculate a string based on values.
Placeholders are identified by the percentage sign followed by a space. The actual text that is placed in the string comes after the percentage sign.
For example, the string "Hello, %s!" can be used to greet someone's name. To replace the placeholder with a value, simply remove the percentage sign before the space.
The string can be formatted in two ways:
Using decimal numbers with a unit
Using a mixed number with a unit
Here are some examples of formatting strings:
The string "123 cm" can be formatted as "1 meter" or "1.0 meter".
The string "7.5 liters" can be formatted as "7.5 gallons" or "7.5 imperial gallons".
The string "21 kg" can be formatted as "21 lbs" or "21 pounds". To generate the content of the image, the following Python code can be used:
My name is Zara and weight is 21 kg! The answer is D.

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

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

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

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


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

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

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" )

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" )


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

The code can be generated by hand. The answer is A.

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

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

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

n = 6
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 'weiou']
print("Vowels are:", get_vowels('This is some random string'))
B. def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('This is a string'))
C. def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('string'))
D. def get_vowels(string):
return [vowel for vowel in string if vowel in 'aeiou']
print("Vowels are:", get_vowels('This is some random string'))

A Python code is a set of instructions that a computer can understand and execute.
Before you write Python code, it is often helpful to plan out the code. Planning helps you to write code that is clear and easy to read.
Types of code
There are many different types of code. Some examples are:
Functions: blocks of code that can be called upon demand
Classes: models of real-world objects that can be created and destroyed
Lists: collections of items that are ordered by default
Strings: pieces of text that are stored in computer memory
Numbers: numeric values that can be used for calculations
Control flow statements: instructions that tell the computer which path to follow
The following code is a function that adds two numbers.
def add_numbers(num1, num2):
The answer is B.

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'))

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'))


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

Functions are used by objects. Look at the object.
Think about how it is used.
Then, decide if the object's function is A, B, C, or D.
Stirring mixes a substance. The function of a stirrer is A.
Boiling water is used to make tea. The function of a lid is to cover a pot.
Cutting a vegetable is a function that a knife can have. The function of a knife is D.
A spoon's function is to eat food. The function of a spoon is A. The answer is D.


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

Functions are the uses of objects.
For each object, ask these questions:
What is the object meant to do?
What is the object used for?
How is the object used?
Boiling water is the function of a boiler.
Stir is the function of a spoon.
Cut vegetables is the function of a knife.
Purify water is the function of a water purifier. The answer is B.


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

Functions are used by objects. Look at the object.
Think about how it is used.
The function of an object is to do something.
Different objects can have different functions.
A knife has the function of cutting. A water pitcher has the function of pouring water. Boiling water has the function of making water boil. The answer is B.


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

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 object is a pencil.
A pencil can write. The function of a pencil is to write. The answer is D.


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

Functions are what objects do. Functions carry out tasks.
Look at the picture of the object.
The function of the demonstrated object is to bind. The answer is B.


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

Functions are used to describe what an object does.
How do you describe the function of an object?
First, you need to identify what the object is. Then, you need to describe the object's shape and size.
Next, you need to think about what the object is used for.
You can use the object's shape and size to help you describe its function. For example, a large flip-top cap on a bottle tells you that the cap is used for closing the bottle. A long, thin object with a flat bottom and sides is probably used for a surface to write on.
You can also use words to describe the function of an object. Don't be afraid to use more than one word to describe an object's function.
A draw object is used for drawing.
A deposit object is used to deposit, or put, something into a space.
A cut object is used to cut something into pieces.
Refrigeration is the process of keeping something cool. The function of the demonstrated object is draw. The answer is D.


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

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 help you do something. Look at the picture of the object.
The object is a safe. A safe keeps things safe.
The function of the safe is to keep things safe. The answer is B.


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

Functions are used to describe what an object does.
The function of an object is to achieve a goal.
Look at the picture of the object.
The object is a hammer.
Hammers hit things.
The function of the hammer is to hit. The answer is D.


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

An object's function tells you what it does.
The function of a object is to make it useful. Every object has a function.
Look at the picture of the object.
The object is made of metal.
Metal objects can be used to hit things. The object can hit things with a solid surface.
The function of the object is to hit things. The answer is D.


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

Functions are used by objects. Look at the object.
The function of an object is to do something.
For example, a hammer's function is to hit nails. A clamp's function is to hold things together. The demonstrated object can tighten tightly.
The function of an object is to do something. This object can tighten tightly. The answer is A.


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

Functions are used by objects. Look at the object.
Think about what the object is used for.
The function of an object is to do that thing.
Drill functions to make holes in things.
A clamping function keeps an object closed or locked in place.
Separatist functions to keep things separate.
Incise functions to cut into something. The answer is C.


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

Functions are used to describe what an object does.
Objects can have more than one function. A function can describe a single action or multiple actions.
Look at the picture of the object.
The object is a clamping device. It can be used to hold something in place.
Clamping devices can have different shapes and sizes. This clamping device has a flat jaw and a movable jaw. The movable jaw is spring-loaded. This means it is pulled back by a spring. The spring helps the movable jaw move to the correct position. The answer is A.


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

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. And it can hold things in place while you measure length.
A weld has two functions. It joins two metal objects. And it hardens to make the join strong. The function of the demonstrated object is to measure the level.
The object is a level. It measures the level. The answer is C.


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

Functions are used products. Use the described object to determine its function.
Instructions: Look at the object.
The object is a wheelbarrow.
A wheelbarrow is used to transport items. The answer is A.


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

Look at the object.
The object is a welding generator.
A welding generator welds two pieces of metal together. So, the function of the demonstrated object is weld. The answer is B.


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

Functions are what objects do. Functions tell you using words what a object is for.
Look at the picture of the object.
The function of the object is to measure the temperature.
Brushing and burnishing are not what this object does. The answer is A.


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

Functions are what objects do. Functions can be described using words such as measure, cut, lift, and carry.
Objective: When you look at an object, try to figure out its function.
How do you do this?
First, ask yourself what the object is used for. Then, look at the word(s) that describe the object's function. The function of an object is described by words that tell you how to use the object.
If the word lift is in the description of an object, you know that the object can lift things. If the word carry is in the description of an object, you know that the object can carry things. The function of an object is to do the thing(s) described by the words in its description. The answer is B.


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

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.
Measurements can tell you how long, wide, and high objects are. Measurements can also tell you how far, how fast, and how much objects weigh. The answer is A.


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

Look at the object.
The object is a bulldozer. A bulldozer's function is bulldozing.
The bulldozer is pushing the dirt around to make a flat surface. This flat surface is a platform. The answer is B.


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

Tools are made for a function. That function is to make work easier.
Look at the object.
The object is a cutting platform.
The cutting platform can be used to cut wood or other materials. The answer is C.


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

Functions are used to describe what an object does.
When you write a function for an object, you are telling someone else how to use the object. Writing functions for objects is important because it lets you communicate with others. They can then use the object in the way you intended.
Look at the picture of the wok.
The wok is a pan. It can be used to cook things.
Now look at the function of the demonstrated object.
A wok is used to cook soup.
So, the function of the demonstrated object is to cook soup. The answer is A.


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

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 describe the object's function.
For example, a tube-shaped object with a mouth and a hole near the mouth is a suction tube. A suction tube draws liquid up through the hole.
A muscle-shaped object with two ends is a flexor. A flexor contracts, or tightens, around something.
A finger is a muscle. When you touch something with your finger, you use your finger's muscle to grab the object.
A cooking pot is a container that holds food. When you cook food, you put it into a pot. The pot of food will get hot, and the food will begin to cook. The function of the demonstrated object is to cook soup.
The object has a cover, which is a body part. The cover keeps heat in and water out.
The object also has a timer, which is a body part. The timer keeps track of how long the soup has been cooking. The answer is A.


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

Functions are used to describe what an object does.
How do you describe the function of an object?
First, identify the object's shape. Then, describe the role the object plays in a scenario.
Imagine an object in the shape of a triangle. The function of this object is to point upward. The function of a shape is to help an object perform a specific task. Look at the picture of the object.
The object is a pan. A pan's function is to cook food. The answer is D.


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

Look at the object.
The object is a grill.
A grill has the function of cooking food. The food gets hot inside the grill. The answer is D.


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

An object's function tells you what the object is used for. Look at the picture of the object.
The demonstrated object is a set of three sifters. The function of a sifter is to separate a mixture of items by size.
Separating items by size is called sifting. The largest items will stay in the sifter, and the smallest items will fall through the openings. The answer is A.


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

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 organisation. The answer is B.


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

The function of an object is what it does.
Look at the object.
Think about how it looks or feels.
Of the choices, the grill is the function of the demonstrated object. A grill is something you put food on while it is cooking. The answer is D.


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

Functions are used by objects. Look at the object.
The function of an object is to do something.
If you know what something is used for, that tells you its function. The function of a object is to do the thing it is used for.
Heavy objects like this one can be used to lift other objects.
A lever can be used to lift this object. Levers can be used to lift objects without much effort.
This object is used for baking. The function of the demonstrated object is baking. The answer is D.


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

Functions are used to describe what an object does.
Functions can be simple or complex. A simple function can have only one purpose. For example, a knife has one purpose: to help you cut food.
A complex function can have more than one purpose. For example, a cell phone can serve several purposes, such as making calls, sending texts, and checking email.
To describe the function of an object, ask yourself what the object is used for. Then, choose the answer that corresponds to that purpose. Stationery is a category of objects.
Stationery includes objects such as paper, pens, and notebooks. The function of a stationery object is to help you write.
Recieve is a function.
Receiving is the purpose of accepting something. The demonstrated object is a set of three yellow, green, and pink rectangles of stationery. The function of this object is to help you write. The answer is B.


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

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. The answer is D.


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

Military defense.
This object is a military scope. It helps a soldier observe and aim his rifle. The answer is C.


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

Military defense is the function of the demonstrated object.
An object's function is what it is used for. Look into the distance, observe the interstellar, and recognize the direction are not functions of this object. The answer is C.


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

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


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

Smoking is prohibited here.
This sign means that smoking, or using tobacco in some way, is not allowed in the place shown by the sign. The answer is D.


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

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


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

Football Game
There are four teams. Which two teams will take part in this game?
Team A and Team C.
Team B and Team C.
Team A and Team D.
Team A and Team B. The answer is D.


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

The purpose of a poster is to get you to do something. Posters show information that is important to you.
Look at the poster.
What does it show?
The poster shows information that is important to those who work at the company. It shows the company's values. It shows the company's open positions. The answer is A.

To find qualified candidates for the open positions.


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

An operation on fractions is a calculation that can be performed with fractions.
Fractions that represent the same number can be converted into each other by operations. For example, the fraction 3/4 can be converted into the fraction 4/6 by performing the operation of dividing by 2.
To perform this operation with fractions, first convert the fractions to have a common denominator, such as 6.
Then, perform the operation of dividing the top fraction by the bottom fraction. The result is 4/6.
The formula represents the operation of dividing two fractions. To see this, consider the right-hand side of the formula.
The top fraction represents the number that is being divided. In this case, it is ad. The bottom fraction represents the denominator of the fractions being divided. In this case, it is bd.
So, the formula represents the operation of dividing two fractions. This operation is represented by the formula ad / bd. The answer is C.


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

An operation on fractions is a calculation that can be performed with fractions.
For example, you can add fractions by combining their numerators and denominators. Or you can multiply fractions by combining their numerators and multiplying their denominators.
To perform these operations, you must follow the rules for adding and multiplying whole numbers. For example, if you add two fractions, you must add their numerators and add their denominators. Or if you multiply two fractions, you must multiply their numerators and multiply their denominators.
Rules for adding and multiplying fractions:
Adding fractions:
To add two fractions, add their numerators and add their denominators.
For example, the fraction 3/4 + 1/2 is equal to 3/4 + 1/2 = 4/4 + 2/2 = 6/4.
Multiplying fractions:
To multiply two fractions, multiply their numerators and multiply their denominators.
For example, the fraction 3/4 x 1/2 is equal to 3/4 x 1/2 = 3/2.
Dividing fractions:
To divide two fractions, divide their numerators and divide their denominators.
For example, the fraction 4/5 / 2/5 is equal to 4/5 / 2/5 = 2/5. The operation represented by this formula is subtraction.
To subract two fractions, subtract their numerators and subtract their denominators.
For example, to subract the fraction 3/4 from the fraction 1/2, you must subtract 3 from 2 and subtract 4 from 2. This leaves 1/2 - 3/4 = 1/2. The answer is A.


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

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. For example, if you have fractions such as 1/3 and 1/4, adding them gives you 1/1. Subtracting 1/3 from 1/4 gives you 2/11.
Fractions can also be multiplied or divided. For example, if you have fractions such as 1/3 and 2/3, multiplying them gives you 2/3. Dividing 1/3 by 2/3 gives you 1/6.
The operation that is represented by the formula x / y - z / y is subtraction.
To see why, consider what happens when you subtract a fraction from another fraction. For example, if you have the fractions 1/3 and 1/4, subtraction gives you 1/3 - 1/4.
To write this as a formula, write the first fraction with the bottom number gone. So, 1/3 - 1/4 is represented by the formula x / y. To get the formula x / y - z / y, subtract the second fraction from the first fraction.
Now look at the answer choice A. Subtract is the operation represented by the formula x / y - z / y. The answer is A.


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

This picture wants to express positive thinking.
The picture of the smiling sunflower shows that it cares for positive thinking. The answer is B.

We are expected to care for green plants.


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

This picture wants to express that we are expected to care for the earth.
The word care is shown in the picture. The hands holding the earth show that we are expected to care for the planet. The answer is A.

We are expected to care for green plants.


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

To celebrate National Day.
National Day is a celebration of a country's independence or flag day. Independent countries choose to celebrate National Day instead of their country's independence day. Look at the poster.
The poster says, "Happy National Day!" It does not say, "Happy Christmas" or "Happy Birthday." So, the most likely purpose of this poster is to celebrate National Day. The answer is C.


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

To celebrate someone's birthday.
The most likely purpose of this poster is to celebrate someone's birthday. Birthdays are celebrations of a person's birth. Yearly celebrations of birth are called birthdays. The answer is A.


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

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


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

Earth Day is associated with this poster.
Earth Day is a special day for people to think about the world around them. The answer is D.


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

National Reading Day is associated with this poster. The answer is A.


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

Mother's Day is associated with this poster.
The first Mother's Day was celebrated in 1908. That year, Anna Jarvis wanted to honor her mother, who had died a few years earlier. Anna Jarvis chose the second Sunday in May to celebrate Mother's Day. The answer is C.


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

Mother's Day is associated with this poster. The answer is C.


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

Children's Day is associated with this poster.
Children's Day is a celebration of children. The answer is A.


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

The area of a shape can be calculated using a formula. For triangles, the formula is base times height. For rectangles, the formula is length times width. For circles, the formula is pi times radius squared. And for squares, the formula is side times side.
Look at the picture of the shape.
The shape is a triangle.
The base of the triangle is 2 units. The height is 3 units.
So, the area of this triangle is 2 units x 3 units = 6 square units. The answer is B.


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

The area of a shape can be calculated using a formula. For rectangles, the formula is length x width. For triangles, the formula is base x height. For circles, the formula is diameter. For squares, the formula is side x side.
Look at the picture of the shape.
The shape is a triangle.
The triangle has two sides, or legs. The length of each side is 3. The width is 4.
So, the area of this triangle is 3 x 4 = 12. The answer is B.


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

The area of a shape can be calculated using the formula:
where width is the width of the shape and length is the length of the shape.
To use this formula, it is necessary to know the dimensions of the shape. Look at the picture of the shape.
The shape is a triangle. The length of a triangle is the side length. The side length of this triangle is 3.
The width of this triangle is 4. So, the area of this triangle can be calculated using the formula.
To find the area of a circle, calculate the value of pi (π). Pi is a mathematical constant representing the ratio of the circumference to the diameter of a circle.
The diameter of a circle is the distance from one point on the circle to the opposite point. Pi can be calculated using the formula:
Where C is the circumference of a circle and D is the diameter of a circle.
To find the area of a square, multiply the length by the width of the shape.
The width of this square is 4. The length of this square is 5. So, the area of this square is 20 square units.
To find the area of a rectangle, multiply the width by the length of the shape.
The width of this rectangle is 4, and the length is 5. So, the area of this rectangle is 20 square units. The answer is D.


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

The area of a shape can be calculated using the formula:
where width is the width of the shape and length is the length of the shape.
To use this formula, it is necessary to know the dimensions of the shape. Look at the picture of the shape.
The shape is a square. The width of the square is 2. The length of the square is 2 as well.
So, the area of this shape can be calculated using the formula.
2 is less than 3 and equal to 2.75. 2.75 is less than 3. The answer is B.