PYTHON PROGRAMMING Q4 FUNCTIONS

PYTHON PROGRAMMING Q4 FUNCTIONS

University

20 Qs

quiz-placeholder

Similar activities

JAVA UNIT 1 PART 2

JAVA UNIT 1 PART 2

University

15 Qs

Basic Java Quiz

Basic Java Quiz

University

15 Qs

Data Types Java Concepts

Data Types Java Concepts

University

19 Qs

CES JAVA

CES JAVA

University

20 Qs

PYTHON FUNCTION

PYTHON FUNCTION

University

20 Qs

Mock 2nd MCQ Python

Mock 2nd MCQ Python

University

25 Qs

C programming

C programming

University

15 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 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?