From 926bc239a298f9938c7d5685b35c34335eb254fb Mon Sep 17 00:00:00 2001 From: Jordan1-34 <131589592+Jordan1-34@users.noreply.github.com> Date: Sat, 3 Aug 2024 22:37:15 +0100 Subject: [PATCH] Update 034_summarising.py --- 034_summarising.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/034_summarising.py b/034_summarising.py index d64587ce..8106e742 100644 --- a/034_summarising.py +++ b/034_summarising.py @@ -49,16 +49,21 @@ # @TASK: Complete this exercise -print("") +print("add_up_numbers") print("Function: add_up_numbers") # Add up all the numbers in the list def add_up_numbers(numbers): - pass + return word_list + +def check_that_these_are_equal(actual, expected): + assert actual == expected, f"Expected {expected}, but got {actual}" check_that_these_are_equal( add_up_numbers([1, 2, 3, 4]), 10) check_that_these_are_equal( add_up_numbers([2, 3, 4, 5]), 14) +print("All checks passed.") + # When you're done, move on to 035_mapping.py