Mastering Python: Data Types & Functions

Mastering Python: Data Types & Functions

Professional Development

10 Qs

quiz-placeholder

Similar activities

UI3 - Problems when renting

UI3 - Problems when renting

Professional Development

12 Qs

survival

survival

Professional Development

12 Qs

TECHNICAL WORDS - ADJECTIVES AND VERBS

TECHNICAL WORDS - ADJECTIVES AND VERBS

Professional Development

10 Qs

Adjectives

Adjectives

Professional Development

10 Qs

PR REFRESHMENT

PR REFRESHMENT

Professional Development

10 Qs

Prepositions of movement

Prepositions of movement

Professional Development

10 Qs

Present Continuous (gerunds and sentences)

Present Continuous (gerunds and sentences)

Professional Development

11 Qs

CTJ - St. Patrick's Hullabaloo

CTJ - St. Patrick's Hullabaloo

4th Grade - Professional Development

10 Qs

Mastering Python: Data Types & Functions

Mastering Python: Data Types & Functions

Assessment

Quiz

English

Professional Development

Practice Problem

Hard

Created by

Kidi Tran

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

What is the data type of the variable `x` in the following Python code snippet? ```python x = 3.14 ```

int

float

str

bool

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to define a function in Python?

`def my_function:`

`function my_function()`

`def my_function():`

`my_function() = function`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? ```python x = "Hello" y = "World" z = x + " " + y print(z) ```

`HelloWorld`

`Hello World`

`Hello, World`

`World Hello`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a built-in data type in Python?

list

tuple

array

dict

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? ```python def add(a, b): return a + b result = add(3, 4) print(result) ```

7

34

`add(3, 4)`

None

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is used to import a module in Python?

`import module_name`

`include module_name`

`require module_name`

`using module_name`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following expression in Python? ```python 5 // 2 ```

2.5

2

3

2.0

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?