Functions

Functions

Professional Development

10 Qs

quiz-placeholder

Similar activities

Python Basics II

Python Basics II

Professional Development

12 Qs

python MCQ

python MCQ

Professional Development

5 Qs

Week 1 Quiz - Python Basics

Week 1 Quiz - Python Basics

Professional Development

12 Qs

Introduction

Introduction

Professional Development

12 Qs

IOAC - ML Batch Pre-Assessment -4th-Feb

IOAC - ML Batch Pre-Assessment -4th-Feb

Professional Development

10 Qs

Advanced Python Programming Quiz

Advanced Python Programming Quiz

Professional Development

10 Qs

eTwinning nədir?

eTwinning nədir?

Professional Development

10 Qs

Adv Java Quiz TalentNext

Adv Java Quiz TalentNext

Professional Development

10 Qs

Functions

Functions

Assessment

Quiz

Professional Development

Professional Development

Hard

Created by

Elankayer Sithirasenan

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what key word is used to define a function in Python?

assign

define

func

def

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what keyword is used to return a value from a function?

value

output

def

return

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

how will you call a function with the following definition?

def calculate_gcd(a, b):

gcd(56, 72)

calculate_gcd(56. 72)

calculate(56, 72)

def(56, 72)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what will be the output from the following function?

def my_func(name = "Elan"):

print("My name is " + name + "kayer")

"Elan"

"kayer"

"Elankayer"

"Elan kayer"

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what will be returned from the following function if it is called as my_func(6)?

def my_func(a):

return(5*a)

30

5

6

0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what is the use of the 'pass' statement within a function?

define a function with a parameter

pass a value to the function

define function with no content

define a pass function

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what do you understand by the term 'recursive function?

a function calling itself

a function without parameters

a function with return value

a function with an infinite loop

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?