Python Quiz on functions

Python Quiz on functions

6th - 8th Grade

9 Qs

quiz-placeholder

Similar activities

Python Intro

Python Intro

7th - 8th Grade

12 Qs

Java Strings

Java Strings

1st Grade - Professional Development

10 Qs

Quick Fire - Python Quiz

Quick Fire - Python Quiz

7th Grade

8 Qs

Python - Data types and Conditional statements

Python - Data types and Conditional statements

4th - 8th Grade

10 Qs

Python Programming

Python Programming

7th - 9th Grade

10 Qs

Buổi 2 C++ Cơ bản

Buổi 2 C++ Cơ bản

6th Grade

10 Qs

KODEKIDDO HACK #MLH3

KODEKIDDO HACK #MLH3

4th Grade - University

10 Qs

Python - Week 1

Python - Week 1

8th - 10th Grade

10 Qs

Python Quiz on functions

Python Quiz on functions

Assessment

Quiz

Computers

6th - 8th Grade

Medium

Created by

Ridhaan Mishra

Used 3+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function?

piece of code.

a type of variable.

a block of code which runs when it is called.

a block of code which runs automatically when we test our code.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following function?

14

1

4

1,2

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a function?

def function():

print('hi')

def function()

print('hi')

make function():

print('hi')

define function():

print('hi')

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the function?

Hello World!

Bye!

Hello World!

Hello World!

Bye!

Bye!

Hello World! Bye!

Hello World!

Hello World! Bye!

Hello World! Bye!

5.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

___ function():

Fill in the blank.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output?

a triangle

fd(120)

rt(120)

Nothing

Error

7.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Media Image

Rewrite this line of code correctly.

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of following code snippet:

10

24

7

1

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a recursive function?

A function that calls other function.

A function which calls itself.

Both A and B

None of the above