Mastering Python: Data Types & Functions

Mastering Python: Data Types & Functions

Professional Development

10 Qs

quiz-placeholder

Similar activities

superlative

superlative

Professional Development

15 Qs

Reading B 15 - 16

Reading B 15 - 16

Professional Development

12 Qs

T6_Global Issues

T6_Global Issues

1st Grade - Professional Development

14 Qs

Introducing Yourself and Make A Friend

Introducing Yourself and Make A Friend

Professional Development

10 Qs

New Year - partial translations

New Year - partial translations

8th Grade - Professional Development

10 Qs

Past Tenses

Past Tenses

University - Professional Development

13 Qs

Dominican Revolution

Dominican Revolution

9th Grade - Professional Development

10 Qs

Toefl Practice (Grammar/Skill 1-5)

Toefl Practice (Grammar/Skill 1-5)

University - 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?