Python Pre-defined Functions

Python Pre-defined Functions

9th Grade

10 Qs

quiz-placeholder

Similar activities

RL Python Basics Quiz 1

RL Python Basics Quiz 1

9th - 12th Grade

10 Qs

10 CS // Pseudocode

10 CS // Pseudocode

9th - 11th Grade

10 Qs

Python Testing

Python Testing

9th - 12th Grade

10 Qs

Python Basics

Python Basics

8th - 10th Grade

10 Qs

Python_R

Python_R

2nd Grade - Professional Development

8 Qs

Bài 26: Hàm trong Python-Lớp 10

Bài 26: Hàm trong Python-Lớp 10

9th - 12th Grade

10 Qs

Programming python review

Programming python review

9th - 12th Grade

15 Qs

Lists and Loops in Python

Lists and Loops in Python

9th Grade

10 Qs

Python Pre-defined Functions

Python Pre-defined Functions

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Tracy Mutter

Used 8+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the random function in Python do?

Generates random numbers

Generates random characters

Generates random letters

Generates random strings

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the len function in Python do?

The len function returns the index of the first occurrence of a specified value in a list.

The len function returns the sum of all elements in a list.

The len function returns the number of items in an object.

The len function returns the length of a string.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the round function in Python do?

The round function in Python rounds a number to a specified number of decimal places or to the nearest whole number.

The round function in Python returns the square root of a number.

The round function in Python generates a random number between two given numbers.

The round function in Python converts a number to a string.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of len('Hello World')?

10

5

11

12

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of round(3.14159, 2)?

3.13

3.15

3.14

3.1

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to generate random numbers in Python?

random.random

random.randint

random.choice

random.shuffle

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of round(2.5)?

2

3

2.5

0

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?