When defining a function, which keyword do we use?, Programming Essentials help

Anonymous
timer Asked: Jun 21st, 2016
account_balance_wallet $5

Question Description

Question 1

  1.  

    When defining a function, which keyword do we use:

    define

    def

    function

    func

1 points  

Question 2

  1.  

    We _________ the lines of code that belong to the body of a function so the interpreter understand what makes up the body of the function.

    bold

    place curly braces around

    indent

    number

1 points  

Question 3

  1.  

    The “return” keyword is:

    used to stop the function and return to the calling function.

    required to end all function definitions.

    create a new line on the screen output.

    return a value from the function, back to the calling function.

1 points  

Question 4

  1.  

    When defining a function, we declare a(n) ________  in parenthesis , so that we can pass data into the function for processing.

    Parameter

    Argument

    Identifier

    Pointer

1 points  

Question 5

  1.  

    If we declare a variable called ‘name’ inside of a function while there is a global variable with the same name, which variable is referenced from inside of the function in the following command: print(name)?

    The global variable

    The local variable

    You cannot have multiple variables with the same name, regardless of scope.

    you have to specify with a leading command

1 points  

Question 6

  1.  

    When condtructing a function, which is NOT a minimum requirement:

    unique identifier

    the def keyword

    a parameter list

    return command

1 points  

Question 7

  1.  

    It is a best practice to define functions that perform as many operations as possible.

1 points  

Question 8

  1.  

    When you define a variable inside of a function, that variable can be seen:

    By commands inside of the function only.

    By commands in global space.

    By commands in other functions.

    By commands in other functions called by the function in question.

1 points  

Question 9

  1.  

    When we say that a variable defined in a function can only be seen by commands inside of that same function, the variable is limited by _____________.

    Run-time

    Scope

    Size

    Definition

1 points  

Question 10

  1.  

    Python defines scope using:

    Curly braces { }

    Square brackets [ ]

    The keywords start and end

    Indentation


Tutor Answer

DrCS
School: Rice University

flag Report DMCA
Review

Anonymous
Thanks, good work

Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors