PYTHON PROGRAMMING Q4 FUNCTIONS

PYTHON PROGRAMMING Q4 FUNCTIONS

University

20 Qs

quiz-placeholder

Similar activities

oops using java quiz

oops using java quiz

University

15 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

JAVA UNIT 1 PART 2

JAVA UNIT 1 PART 2

University

15 Qs

Arrays and Pointers in C

Arrays and Pointers in C

University

15 Qs

C# Ex.01

C# Ex.01

University

20 Qs

Java Coding Questions

Java Coding Questions

University

20 Qs

Exceptions

Exceptions

University

20 Qs

Loops, Functions, and Conditions Basics

Loops, Functions, and Conditions Basics

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?