From 73ac855c843971cacba4835b0dcf802c1ec636f6 Mon Sep 17 00:00:00 2001 From: abregman Date: Wed, 23 Oct 2019 00:16:15 +0300 Subject: [PATCH] Fix format --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b18e9db..aad2aa9 100644 --- a/README.md +++ b/README.md @@ -1902,10 +1902,11 @@ for char in 'pizza':
-Write a function to return the sum of one or more numbers. The user will decide how many numbers to use.
-``` +Write a function to return the sum of one or more numbers. The user will decide how many numbers to use
+ First you ask the user for the amount of numbers that will be use. Use a while loop that runs until amount_of_numbers becomes 0 through subtracting amount_of_numbers by one each loop. In the while loop you want ask the user for a number which will be added a variable each time the loop runs. +``` def return_sum(): amount_of_numbers = int(input("How many numbers? ")) total_sum = 0 @@ -1916,7 +1917,6 @@ def return_sum(): return total_sum ``` -