Mastering Python: Data Types & Functions

Mastering Python: Data Types & Functions

Professional Development

10 Qs

quiz-placeholder

Similar activities

LINGUISTICS FIRST CLASS REVIEW

LINGUISTICS FIRST CLASS REVIEW

Professional Development

8 Qs

DELTA M1 Overview

DELTA M1 Overview

Professional Development

10 Qs

Cycle 4: Lesson 11 Review.

Cycle 4: Lesson 11 Review.

Professional Development

13 Qs

Module 3.A Quiz show

Module 3.A Quiz show

Professional Development

10 Qs

ILA YL Induction - EY Testing (Smart Learning Update)

ILA YL Induction - EY Testing (Smart Learning Update)

Professional Development

9 Qs

[ENGLISH SUPER STAR] Week 2 - Technology

[ENGLISH SUPER STAR] Week 2 - Technology

Professional Development

15 Qs

Reading 01

Reading 01

Professional Development

5 Qs

Travelling with Grandfather's zoo.

Travelling with Grandfather's zoo.

5th Grade - Professional Development

15 Qs

Mastering Python: Data Types & Functions

Mastering Python: Data Types & Functions

Assessment

Quiz

English

Professional Development

Hard

Created by

Kidi Tran

FREE Resource

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

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?