Python Functions

Python Functions
1 / 10
next
Slide 1: Slide
ComputingUpper Secondary (Key Stage 4)GCSE

This lesson contains 10 slides, with interactive quizzes and text slide.

Items in this lesson

Python Functions

Slide 1 - Slide

Write a function called sausages to allow you to multiple the number of sausages by 7

Slide 2 - Open question

What are parameters in a function?
A
Outputs of the function
B
Inputs for the function
C
Function names
D
Return types of functions

Slide 3 - Quiz

How do you call a function in Python?
A
invoke function_name
B
function_name()
C
execute function_name
D
call function_name

Slide 4 - Quiz

What symbol is used for comments in Python?
A
/*
B
//
C
--
D
#

Slide 5 - Quiz

What keyword is used to define a function?
A
method
B
def
C
function
D
define

Slide 6 - Quiz

What is the purpose of a loop in Python?
A
To repeat a block of code
B
To declare a variable
C
To define a function
D
To import a module

Slide 7 - Quiz

What does 'if' statement do in Python?
A
Imports a library
B
Evaluates a condition
C
Loops through a sequence
D
Declares a class

Slide 8 - Quiz

What method adds an item to a list?
A
extend()
B
insert()
C
attach()
D
append()

Slide 9 - Quiz

How do you access the first element?
A
list[0]
B
list[1]
C
list.get(0)
D
list.first()

Slide 10 - Quiz