Search Header Logo

Python Functions

Authored by Ajay Tech

Other

Professional Development

Used 156+ times

Python Functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The output of the code above will be

0

1

99

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How to add these two numbers

age = int(age_1) + int(age_2)

age = int(age_1 + age_2)

age = age_1 + age_2

3.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Media Image

The string enclosed in triple quotes is called the doc string. It is used to

Show the documentation about the function

be read by the developer reading the function code

4.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Media Image

Which of the following code is true

square() will return 25

square(3) will return 9

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following is true

The code above will result in syntax error

square(2,2) will result in a value of 4

square(2,3) will result in a value of 9

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The above code is the signature of the print function in Python.


*objects represents

Variable number of arguments that can be passed as strings

pointer to objects in memory

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The code above

Takes in variable number of arguments and returns the sum of them

Takes in a pointer to a list of numbers and returns the sum of them

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?