Multiple Choice Questions - Functions

Descrição

Quiz sobre Multiple Choice Questions - Functions, criado por Aparna Dhirde em 15-03-2020.
Aparna Dhirde
Quiz por Aparna Dhirde, atualizado more than 1 year ago
Aparna Dhirde
Criado por Aparna Dhirde mais de 4 anos atrás
110
0

Resumo de Recurso

Questão 1

Questão
Which keyword is use for function?.
Responda
  • define
  • fun
  • def
  • function

Questão 2

Questão
Which of the following items are present in the function header?.
Responda
  • function name
  • parameter list
  • return value
  • Both A and B

Questão 3

Questão
If return statement is not used inside the function, the function will return:.
Responda
  • None
  • 0
  • Null
  • Arbitary value

Questão 4

Questão
Which of the following function headers is correct?.
Responda
  • 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)

Questão 5

Questão
Which of the following is the use of function in python?
Responda
  • 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

Questão 6

Questão
Which of the following is a feature of DocString?
Responda
  • 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

Questão 7

Questão
What is the default return value for a function that does not return any value explicitly?
Responda
  • None
  • int
  • double
  • public
  • null

Questão 8

Questão
Which of the following items are present in the function header?
Responda
  • function name
  • function name and parameter list
  • parameter list
  • return value

Questão 9

Questão
Which of the following enclose the input parameters or arguments of a function?
Responda
  • brackets
  • parentheses
  • curly braces
  • quotation marks

Questão 10

Questão
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)
Responda
  • 5 7
  • 3 9
  • 10 12
  • Error

Questão 11

Questão
print type(type(int))
Responda
  • type 'int'
  • type 'type'
  • Error
  • 0

Semelhante

Livros para ler para o Vestibular
Alessandra S.
PROPRIEDADES COLIGATIVAS
Yani
MAPA MENTAL - METODOLOGIA DO ENSINO SUPERIOR
ilda_silverio
Por que criar flashcards em GoConqr
Luiz Fernando
ORAÇÕES SUBORDINADAS ADVERBIAIS
trackerian
Seguridade Social 3 - Organização e Princípios Constitucionais
André Cavallini
Tipos textuais
brunolorenzatto
O que estudar para a OAB
GoConqr suporte .
Fatoração de Polinômios
Sara Helena
Mapa Conceitual com GoConq
Alessandra S.
PROCESSO LEGISLATIVO
Mateus de Souza