Search Header Logo

Lesson 3 Recap

Authored by P zet

Computers

University

Used 1+ times

Lesson 3 Recap
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to define a function in Python?

def

define

function

class

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is not a valid Python variable name?

my_var

myVar

my-var

myvar

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of the following code: 5 < 3 or 2 > 1?

True

False

SyntaxError

TypeError

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of the following code: for i in range(5): print(i)?

1, 2, 3, 4, 5

TypeError

0, 1, 2, 3, 4

0, 1, 2, 3, 4, 5

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of the following code:

x = 5

y = 3

print(x % y)

?

1

1.67

2

TypeError

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to return data from a function in python?

return

pass

data

def

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?