This function asks the user to enter two numbers. It then subtracts the second number from the first and returns the result.
()
| 13 | |
| 14 | |
| 15 | def subtraction(): |
| 16 | """This function asks the user to enter two numbers. |
| 17 | It then subtracts the second number from the first and returns the result.""" |
| 18 | n_1 = float(input("Enter first number: ")) |
| 19 | n_2 = float(input("Enter second number: ")) |
| 20 | |
| 21 | return n_1 - n_2 |
| 22 | |
| 23 | |
| 24 | def multiplication(): |