Form III - Python Functions and Data Structures Quiz

Form III - Python Functions and Data Structures Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

Pandas - CSV file

Pandas - CSV file

12th Grade

10 Qs

f.e

f.e

10th - 12th Grade

15 Qs

ICT Unit Test Topic : DBMS - Access

ICT Unit Test Topic : DBMS - Access

8th - 12th Grade

15 Qs

ICT TANJORE

ICT TANJORE

12th Grade

11 Qs

Cell Phone Vocabulary

Cell Phone Vocabulary

9th - 12th Grade

12 Qs

Vocabulary of Computer

Vocabulary of Computer

12th Grade

15 Qs

Sprawdź się

Sprawdź się

4th - 12th Grade

10 Qs

Intro to Windows Server 2012

Intro to Windows Server 2012

12th Grade

10 Qs

Form III - Python Functions and Data Structures Quiz

Form III - Python Functions and Data Structures Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Kiers Mcfarlane

FREE Resource

AI

Enhance your content in a minute

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

Which of the following is an advantage of using functions in Python?
Criterion 1: Evaluate and select information sources based on their appropriateness to specific tasks

They make code longer.

They allow you to reuse code efficiently.

They make the code harder to debug.

They increase the risk of errors in the program.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the return statement do in a Python function?
Criterion 2: Apply reasoning to solve real-world problems in various contexts

It sends a result back to the function.

It loops through the function.

`return` terminates the function and sends a result back.

It skips the function.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following would correctly add an item to a list in Python?
Criterion 2: Apply reasoning to solve real-world problems in various contexts

friends.add("Diana")

friends.append("Diana")

friends.insert("Diana")

friends.update("Diana")

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is true about Python dictionaries?
Criterion 1: Evaluate and select information sources based on their appropriateness to specific tasks

They store items in a specific order.

They store key-value pairs.

They can only store strings as values.

They cannot be changed once created.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you try to access a key that doesn’t exist in a Python dictionary?
Criterion 2: Apply reasoning to solve real-world problems in various contexts

The program crashes.

`KeyError` is raised.

It returns an empty string.

It returns `None`.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which block of code correctly handles an exception when a user inputs a non-integer value?
Criterion 1: Evaluate and select information sources based on their appropriateness to specific tasks

Media Image
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is most suitable for storing and accessing information about a student's name, age, and subjects?
Criterion 1: Evaluate and select information sources based on their appropriateness to specific tasks

Media Image
Media Image
Media Image
Media Image

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?