Python_Institute
PCPP-32-101 · Question #57
Which of the following examples using line breaks and different indentation methods are compliant with PEP 8 recommendations? (Choose two.) A. B. C. D.
Sign in or unlock PCPP-32-101 to reveal the answer and full explanation for question #57. The question stem and answer options stay visible for context.
PEP and Best Practices
Question
Which of the following examples using line breaks and different indentation methods are compliant with PEP 8 recommendations? (Choose two.) A. B. C. D.
Exhibit
Options
- A
def foo(arg_a, arg_b): total = arg_a + arg_b # Four spaces for indentation. return total # One tab for indentation. - B
def my_function( var_one, var_two, var_three, var_four): pass - C
def my_function( var_one, var_two, var_three, var_four): pass - D
def my_function(var_one, var_two): total = arg_a + arg_b # Four spaces for indentation. return total # Four spaces for indentation.
Unlock PCPP-32-101 to see the answer
You've previewed enough free PCPP-32-101 questions. Unlock PCPP-32-101 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#PEP 8#line breaks#indentation#code style
