assert average(4, 6) == 5.0 does what if the function returns 7.0?

  1. stops with an AssertionError
  2. returns True
  3. prints 7.0
  4. nothing
Answer

A) stops with an AssertionError

assert raises AssertionError when the condition is False. SLO CS-11-C-07

Computer Science MCQ · More Unit 3: Programming Fundamentals MCQs · Practise