PYTHON PROGRAMMING Q4 FUNCTIONS

PYTHON PROGRAMMING Q4 FUNCTIONS

University

20 Qs

quiz-placeholder

Similar activities

C++ Assesment 1

C++ Assesment 1

University

20 Qs

Python Functions and File Operations Quiz

Python Functions and File Operations Quiz

University

20 Qs

OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

Kuizi 15 - Web

Kuizi 15 - Web

10th Grade - University

15 Qs

Java Programming

Java Programming

University

20 Qs

PHP Quiz 1

PHP Quiz 1

University

20 Qs

Computer Quiz

Computer Quiz

12th Grade - University

16 Qs

Susulan PBO XIRPL (2021/2022)

Susulan PBO XIRPL (2021/2022)

11th Grade - University

20 Qs

PYTHON PROGRAMMING Q4 FUNCTIONS

PYTHON PROGRAMMING Q4 FUNCTIONS

Assessment

Quiz

Computers

University

Medium

Created by

Darwin Vargas

Used 4+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to define a function in Python?

  • A. func

  • B. def

  • C. function

  • D. define

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

  • A. Hello, World!

  • B. hello, world!

  • C. None

  • D. Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you pass multiple arguments to a Python function?

  • A. Separate them with commas

  • B. Separate them with semicolons

  • C. Pass them as a list

  • D. Pass them as a dictionary

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

  • A. 2

  • B. 3

  • C. 5

  • D. 23

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default return value of a function that doesn’t specify a return value?

  • A. 0

  • B. None

  • C. False

  • D. ''

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you specify default values for function arguments in Python?

  • A. Using the default keyword

  • B. Using the set keyword

  • C. Assigning a value in the function definition

  • D. Assigning a value in the function call

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

  • A. Hello,

  • B. Hello, None

  • C. Hello, Guest

  • D. Error

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?