PYTHON PROGRAMMING Q4 FUNCTIONS

PYTHON PROGRAMMING Q4 FUNCTIONS

University

20 Qs

quiz-placeholder

Similar activities

coe java 24 june 21 7:30 to 745 pm only

coe java 24 june 21 7:30 to 745 pm only

University

20 Qs

Programming Concepts in C

Programming Concepts in C

University

20 Qs

Tie Round

Tie Round

University

15 Qs

JS #2 Understanding Function Arguments and Parameters

JS #2 Understanding Function Arguments and Parameters

12th Grade - University

20 Qs

DBMS LAB QUIZ

DBMS LAB QUIZ

University

15 Qs

STGY PPS QUIZ  TEST

STGY PPS QUIZ TEST

University

15 Qs

Python Functions Quiz

Python Functions Quiz

University

20 Qs

Java Object Creation and Classes

Java Object Creation and Classes

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?