Search Header Logo

Python Function Basics

Authored by Olena Sakhanda

Computers

5th Grade

Used 2+ times

Python Function Basics
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Який запис функції правильний?

def some_function()

function some_function()

function some_function():

def some_function():

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Що виведе на екран наступний код?

def fun1(name, age=20):

print(name, age)

fun1('Emma', 25)

  • Emma 25

  • Emma 20

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Що з цього функція?

print()

function

int

func

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Що виведе на екран наступний код?

def fun1(num):

return num + 25

fun1(5)

print(num)

NameError

25

5

30

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Правда чи ні?

Функція завжди виводить значення

Так

Ні

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Що цей код виведе на екран?

def func(a,b):
    print(a-b)
a=4
b=9
func(a=b,b=a)

NameError

-5

5

(9, 4)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Як зупинити функцію?

Використати 'return'

Використати 'end'

Використати 'stop'

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?