Basic Python Commands and Functions: difficulty 2

Determine what the following program prints. Report the printed value as a decimal number.

def scaled_mean(values, factor=2.0):
    return sum(values) / len(values) * factor

print(scaled_mean([3, 6, 9, 14]))

Give your answer as a number.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Basic Python Commands and Functions Questions: