Fix format
This commit is contained in:
parent
10f0b97683
commit
73ac855c84
@ -1902,10 +1902,11 @@ for char in 'pizza':
|
|||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Write a function to return the sum of one or more numbers. The user will decide how many numbers to use.</summary><br><b>
|
<summary>Write a function to return the sum of one or more numbers. The user will decide how many numbers to use</summary><br><b>
|
||||||
```
|
|
||||||
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.
|
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():
|
def return_sum():
|
||||||
amount_of_numbers = int(input("How many numbers? "))
|
amount_of_numbers = int(input("How many numbers? "))
|
||||||
total_sum = 0
|
total_sum = 0
|
||||||
@ -1916,7 +1917,6 @@ def return_sum():
|
|||||||
return total_sum
|
return total_sum
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
Loading…
Reference in New Issue
Block a user