New game
Download
Get Academic Plan
Share game
Froggy Jumps
Froggy Jumps

Chapter 4: Functions..

Integrate it into your platform

You can integrate the game into an LMS compatible with LTI 1.1 or LTI 1.3 such as Canvas, Moodle, or Blackboard. This way, the scores will be automatically saved into the platform’s gradebook.
Download
You have exceeded the maximum number of games you can integrate into Google Classroom with your current Plan.

To integrate as many games as you want in Google Classroom, you need an Academic Plan or a Commercial Plan.

You have exceeded the maximum number of games you can integrate into Microsoft Teams with your current Plan.

To integrate as many games as you want in Microsoft Teams, you need an Academic Plan or a Commercial Plan.

Downloading games is an exclusive feature for users with an Academic Plan or a Commercial Plan.

Get your Academic Plan or your Commercial Plan now and start integrating your games into your LMS, website or blog.

If you wish, you can download a demo game here and test its integration:

Chapter 4: Functions..

Froggy Jumps

Played 29 %Accuracy 62 Average time 17:06

About this activity

Test your function basics

Created by

Viet Nam

Download the paper version to play

Make your own free game from our game creator
Compete against your friends to see who gets the best score in this game

Top Games

%
Anonymous
Anonymous
%
%
%
You have exceeded the maximum number of games you can print with your current Plan.

To print as many games as you want, you need an Academic Plan or a Commercial Plan.

Print your game
Chapter 4: Functions..
 

Froggy Jumps

Chapter 4: Functions..Online version

Test your function basics

by Hoh Trang
1

What is the formal definition of a "function" in Python?

2

Which keyword is used to begin a function definition?

3

What is the output of the following code? def func(a, b): return str(a) + b print(func(10, "5"))

4

What is a "parameter"?

5

What is the result of the expression max('Hello world')?

6

What is the result of the expression min('Hello world')?

7

Which built-in function returns the number of items in its argument (e.g., characters in a string)?

8

If you call int(3.99999), what value is returned?

9

Which function converts an integer or float into a string?

10

To use the sin() or sqrt() functions, which module must you first provide to Python?

11

What is "dot notation" in Python?

12

Approximately how many digits of accuracy does the constant math.pi provide?

13

What value does the random.random() function return?

14

Which function returns a random integer between a specific range, including both endpoints?

15

What is the purpose of the random.choice() function?

16

What are the rules for naming a function?

17

What character must follow the function name and parentheses in a def statement?

18

What is the standard indentation for the "body" of a function in Python?

19

Does defining a function cause the code inside it to run immediately?

20

What is "composition" in programming?

21

What is the output of the following code? def say_hi(): return "Hello" result = say_hi() print(result + "!")

22

What is a "fruitful function"?

23

What is a "void function"?

24

If you assign the result of a void function (like print_twice) to a variable, what value will that variable hold?

25

What is the data type of the special value None?

26

Which statement is used to end a function's execution and send a result back?

27

What is one primary reason to use functions to organize code?

28

What value is stored in the variable val? def calculate(n): res = n * 2 val = calculate(10)

29

What happens if you try to call a function before it has been defined in your script?

30

What is the output of the following code snippet? def computepay(hours, rate): return hours * rate pay = computepay(10, 20) print(pay + 50)

31

What does this program print? def total(x, y): return x + y x = 5 total(10, 10) print(x)

Are you sure you want to leave the page?

If you leave, you will lose the game in progress.