Search Header Logo

Python L39 US Game 1

Authored by Future Teacher

Information Technology (IT)

6th - 8th Grade

Used 11+ times

Python L39 US Game 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the line:

这句代码的目的是什么?

t.ht()

To set the turtle’s heading to zero

将turtle 的航向设置为零

To hide the turtle

为了藏好 turtle

To highlight the turtle
为了让turtle更突出

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the code, what does .penup() do to the turtle?
在代码中,.penup() 对 turtle 做了什么?

stop drawing line

draw more line

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method reads the 50_States.csv file into a DataFrame?

哪种方法可以将 50_States.csv 文件读取到 DataFrame 中?

pandas.open_csv()

pandas.read_csv()

pandas.load()

pandas.read_file()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

填写空白处,将图像添加为海龟形状:

Fill in the blank to add the image as the turtle shape:

screen.__________(image)

addshape

addimage

add_image

add_shape

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does this line return?
这行代码返回什么? state = data[data.state == user_answer]

The DataFrame row(s) where state equals user_answer


DataFrame 中 state 等于 user_answer 的行

The x and y coordinates of the guessed state


guessed state的 x 和 y 坐标

A list of all states except user_answer


除 user_answer 之外的所有states 列表。

An error because state is undefined

因为 state 未定义而导致错误。

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If the CSV file is named "50_states.csv" but your code says "50_States.csv", what will happen and why?
如果 CSV 文件名为“50_states.csv”,但你的代码却写成“50_States.csv”,会发生什么情况?为什么?

The code will run successfully without any issues.
代码将成功运行,不会出现任何问题。

The code will fail to find the file due to case sensitivity.
由于区分大小写,代码将无法找到该文件。

The file will be found but will return empty data.

文件会被找到,但会返回空数据。

The code will throw a syntax error unrelated to the file name. 这段代码会抛出一个与文件名无关的语法错误。

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we use .item() when getting the x and y coordinates?
为什么在获取 x 和 y 坐标时要使用 .item()?

We use .item() to format the coordinates for display.
我们使用 .item() 来格式化坐标以便显示。

We use .item() to retrieve the actual x and y coordinate values from a data structure.
我们使用 .item() 从数据结构中检测实际的 x 和 y 坐标值。

We use .item() to convert coordinates to strings.


我们使用 .item() 将坐标转换为字符串。

We use .item() to calculate the distance between points.

我们使用 .item() 来计算点之间的距离。

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?