Python Functions & Library

Python Functions & Library

12th Grade

12 Qs

quiz-placeholder

Similar activities

OCR Sys Arch J277

OCR Sys Arch J277

10th - 12th Grade

16 Qs

ITGS - IT Systems (Hardware)

ITGS - IT Systems (Hardware)

10th - 12th Grade

14 Qs

Một số khái niệm về lập trình và ngôn ngữ lập trình

Một số khái niệm về lập trình và ngôn ngữ lập trình

KG - 12th Grade

15 Qs

ICT and Retail Industry

ICT and Retail Industry

8th - 12th Grade

13 Qs

Problem Solving : Design Solution

Problem Solving : Design Solution

12th Grade

15 Qs

Sains Komputer Tingkatan 4 - 3.1.1 Mengkaji keperluan intera

Sains Komputer Tingkatan 4 - 3.1.1 Mengkaji keperluan intera

1st Grade - Professional Development

10 Qs

Flowol

Flowol

KG - University

10 Qs

Security and Ethics

Security and Ethics

9th - 12th Grade

17 Qs

Python Functions & Library

Python Functions & Library

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Bessie Carl

Used 37+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Consider the following code:

0

1

2

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Consider the following code:

1 2 2

2 1 2

4 2 2

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of the following code snippet?

1 3

2 3

The program has a runtime error because x and y are not defined.

3 2

3 3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following piece of code?

4

5

1

An exception is thrown

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What is the output of the below program?

x is 50Changed global x to 2Value of x is 50

x is 50Changed global x to 2Value of x is 2

x is 50Changed global x to 50Value of x is 50

None of the mentioned

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the function shown below (random module has already been imported)?


random.choice('sun')

sun

either s,u or n

u

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A package is a folder containing one or more Python modules. One of the modules in a package must be called _______.

__package__.py

init.py

main.py

__init__.py

__main__.py

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?