From f333950cb914ca817b3822fea7edc53648e4250e Mon Sep 17 00:00:00 2001 From: Michael G <44246042+mikejgurch@users.noreply.github.com> Date: Fri, 18 Oct 2019 12:43:43 -0500 Subject: [PATCH] Added a file called subtract.py, which demonstrates the minus (-) operator in Python. Sample program that demonstrates the minus operator (-) in Python. --- SimpleAddition/subtract.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 SimpleAddition/subtract.py diff --git a/SimpleAddition/subtract.py b/SimpleAddition/subtract.py new file mode 100644 index 0000000..4956918 --- /dev/null +++ b/SimpleAddition/subtract.py @@ -0,0 +1,8 @@ +# Simple Python program to subtract Two Numbers + +num1 = input(" Please Enter the 1st Number: ") +num2 = input(" Please Enter the 2nd number: ") + +# Using arithmetic - Operator to subtract two numbers +total = float(num1) - float(num2) +print('The total of {0} minus {1} is {2}'.format(num1, num2, total))