Multiple Choice Questions - Functions

Beschreibung

Quiz am Multiple Choice Questions - Functions, erstellt von Aparna Dhirde am 15/03/2020.
Aparna Dhirde
Quiz von Aparna Dhirde, aktualisiert more than 1 year ago
Aparna Dhirde
Erstellt von Aparna Dhirde vor mehr als 4 Jahre
110
0

Zusammenfassung der Ressource

Frage 1

Frage
Which keyword is use for function?.
Antworten
  • define
  • fun
  • def
  • function

Frage 2

Frage
Which of the following items are present in the function header?.
Antworten
  • function name
  • parameter list
  • return value
  • Both A and B

Frage 3

Frage
If return statement is not used inside the function, the function will return:.
Antworten
  • None
  • 0
  • Null
  • Arbitary value

Frage 4

Frage
Which of the following function headers is correct?.
Antworten
  • def fun(a = 2, b = 3, c)
  • def fun(a = 2, b, c = 3)
  • def fun(a, b = 2, c = 3)
  • def fun(a, b, c = 3, d)

Frage 5

Frage
Which of the following is the use of function in python?
Antworten
  • Functions are reusable pieces of programs
  • Functions don’t provide better modularity for your application
  • you can’t also create your own functions
  • All of the mentioned

Frage 6

Frage
Which of the following is a feature of DocString?
Antworten
  • Provide a convenient way of associating documentation with Python modules, functions, classes, and methods
  • All functions should have a docstring
  • Docstrings can be accessed by the __doc__ attribute on objects
  • All of the mentioned

Frage 7

Frage
What is the default return value for a function that does not return any value explicitly?
Antworten
  • None
  • int
  • double
  • public
  • null

Frage 8

Frage
Which of the following items are present in the function header?
Antworten
  • function name
  • function name and parameter list
  • parameter list
  • return value

Frage 9

Frage
Which of the following enclose the input parameters or arguments of a function?
Antworten
  • brackets
  • parentheses
  • curly braces
  • quotation marks

Frage 10

Frage
What will be the output of the following Python code?. def function1(var1=5, var2=7): var2=9 var1=3 print (var1, " ", var2) function1(10,12)
Antworten
  • 5 7
  • 3 9
  • 10 12
  • Error

Frage 11

Frage
print type(type(int))
Antworten
  • type 'int'
  • type 'type'
  • Error
  • 0
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Das erste Jahr an der Uni
JohannesK
Thermodynamik I/II
K G
Tiefergreifendes Lernen - Wie umsetzen?
Laura Overhoff
Systemwissenschaften 1 Teil Jäger
Gustav Glanz
Tierhaltung & Tierhygiene 1
Anne Käfer
Vetie Radiologie VL 2013
Cedric-Bo Lüpkemann
Vetie Repro 2018
Johanna Müller
Vetie Parasitologie
Alina Stumpf
Reprospass 4
S J
Vetie - Spezielle Pathologie 2021
Valerie Nymphe