Functions G.12

Functions G.12

11th Grade

14 Qs

quiz-placeholder

Similar activities

#10 Codecademy/KhanAcademy Weekly Quiz: Coloring with JavaScript

#10 Codecademy/KhanAcademy Weekly Quiz: Coloring with JavaScript

9th - 12th Grade

9 Qs

Unit 3 Review

Unit 3 Review

10th - 12th Grade

15 Qs

Sains Komputer Tingkatan 5 - 3.1.7 Penggunaan Procedure dan

Sains Komputer Tingkatan 5 - 3.1.7 Penggunaan Procedure dan

10th - 12th Grade

17 Qs

AP CSP 7 - PT Terminology (Unit 9 - Code.org)

AP CSP 7 - PT Terminology (Unit 9 - Code.org)

11th Grade

17 Qs

Python Functions

Python Functions

9th - 12th Grade

13 Qs

Objects

Objects

8th - 12th Grade

16 Qs

For Loop in Python

For Loop in Python

11th Grade

10 Qs

Modularity - parameters, local and global variables

Modularity - parameters, local and global variables

11th Grade - University

18 Qs

Functions G.12

Functions G.12

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Nicolas Homsi

Used 3+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function in Python?

A function in Python is a type of variable

A function in Python is a loop structure

A function in Python is a built-in data type

A function in Python is a block of reusable code that performs a specific task.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a function in Python?

define function_name(parameters):

function_name(parameters)

function_name(parameters):

def function_name(parameters):

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are parameters in a function?

Variables declared outside the function

Variables listed inside the parentheses of a function definition

Constants defined within the function

Data types used in the function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many parameters can a function have in Python?

Unlimited

Only 3

Unlimited with a maximum of 10

Limited to 5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

To define the function parameters

To terminate the function execution

To skip a specific code block

To specify the value that the function should output.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can a function return multiple values in Python?

Yes

No

Only in specific cases

Sometimes

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for calling a function in Python?

functionName(argument1, argument2, ...)

function_name{argument1, argument2, ...}

function_name(argument1, argument2, ...)

function_name[argument1, argument2, ...]

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?