Python Functions Quiz

Python Functions Quiz

6th - 8th Grade

7 Qs

quiz-placeholder

Similar activities

CodeMonkey程式觀念測驗(琢思 201812078)

CodeMonkey程式觀念測驗(琢思 201812078)

3rd - 9th Grade

10 Qs

HARDWARE AND SOFTWARE

HARDWARE AND SOFTWARE

2nd - 10th Grade

10 Qs

Revision Quiz 2 - Information Technology

Revision Quiz 2 - Information Technology

7th - 8th Grade

10 Qs

Kodu- grade 6 test

Kodu- grade 6 test

6th Grade

10 Qs

brain storming and mind maps

brain storming and mind maps

6th Grade

10 Qs

Word 2016 Basics - Saving Document, Page Layout, Header & Foot

Word 2016 Basics - Saving Document, Page Layout, Header & Foot

7th Grade

10 Qs

History of computer

History of computer

6th - 8th Grade

10 Qs

Practical Summative Assessment G7-C

Practical Summative Assessment G7-C

7th Grade

10 Qs

Python Functions Quiz

Python Functions Quiz

Assessment

Quiz

Computers

6th - 8th Grade

Practice Problem

Medium

Created by

Austin OBrien

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword do we start with when creating our own functions in Python?

function

def

void

main

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does 'def' stand for?

deft

defend

definitely

define

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following Python code?

def add(a, b):
    return a + b

result = add(3, 5)
print(result)

8

5

3

35

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'return' statement in a Python function?

To stop the execution of the function

To return a value from the function

To print a message to the console

To define a new variable

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When declaring a function, the variables inside the parentheses are called what? Example:

def add(num1, num2)

Copies

output variables

input variables

strings

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When we want to run a function, we...

Define it

Call it

Declare it

Copy it

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function can return a value or many values back to where it was first "called".

True

False

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?