logo

Question detail

In the Python subroutine definition below, which value is passed to the parameter named number when the subroutine is called? ```python def showDouble(number): print(number * 2) showDouble(7) ```

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

MCQ

Type

practice

Style

Topic

Programming

Exam-style question

Try this first

In the Python subroutine definition below, which value is passed to the parameter named number when the subroutine is called? ```python def showDouble(number): print(number * 2) showDouble(7) ```.

  1. A.2
  2. B.7
  3. C.14
  4. D.number

Model answer

What a good answer should say

  • 7

Explanation

Why this works

The argument 7 is supplied in the call and is passed to the parameter number. The subroutine then calculates 7 multiplied by 2, producing 14.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.