From af76f7c8461f2471d573f3585bd0293a00e9e452 Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Fri, 24 Apr 2020 20:11:53 +0100
Subject: [PATCH 01/25] Create index.html
---
subtract_numbers/index.html | 1 +
1 file changed, 1 insertion(+)
create mode 100644 subtract_numbers/index.html
diff --git a/subtract_numbers/index.html b/subtract_numbers/index.html
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/subtract_numbers/index.html
@@ -0,0 +1 @@
+
From 6c1a9e82c4df83a420255df5a791749335c731af Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Fri, 24 Apr 2020 20:12:47 +0100
Subject: [PATCH 02/25] Add files via upload
---
subtract_numbers/credit.txt | 1 +
subtract_numbers/index.html | 16 +++++++++++++++-
subtract_numbers/soln.py | 26 ++++++++++++++++++++++++++
subtract_numbers/title.txt | 1 +
4 files changed, 43 insertions(+), 1 deletion(-)
create mode 100644 subtract_numbers/credit.txt
create mode 100644 subtract_numbers/soln.py
create mode 100644 subtract_numbers/title.txt
diff --git a/subtract_numbers/credit.txt b/subtract_numbers/credit.txt
new file mode 100644
index 0000000..b869b75
--- /dev/null
+++ b/subtract_numbers/credit.txt
@@ -0,0 +1 @@
+The example was solved by Mbaoma Chioma Mary (Section Leader for Section 223)
\ No newline at end of file
diff --git a/subtract_numbers/index.html b/subtract_numbers/index.html
index 8b13789..5a17664 100644
--- a/subtract_numbers/index.html
+++ b/subtract_numbers/index.html
@@ -1 +1,15 @@
-
+
+
+
+
+ Subtract numbers
+
+
+Write a program in the file subtract_numbers.py that reads two real numbers from
+the user and prints the first number minus the second number. You can assume the
+user will always enter valid real numbers as input (negative values are fine). Yes, we
+know this problem is really similar to a problem we did in class – that’s why this
+problem is a sandcastle!
+
+
+
\ No newline at end of file
diff --git a/subtract_numbers/soln.py b/subtract_numbers/soln.py
new file mode 100644
index 0000000..80d76cb
--- /dev/null
+++ b/subtract_numbers/soln.py
@@ -0,0 +1,26 @@
+#subtract numbers
+#a python script which accepts two numbers from the user,
+#and subtracts the second from the first
+
+#define the function
+def main():
+ #accept the first input
+ #float keyword converts the input to a decimal number for uniformity
+ first_number = float(input('Kindly enter a number: '))
+
+ #accept the second input
+ second_number = float(input('Kindly enter another number: '))
+
+ #subtract the second input from the first input
+ result = first_number - second_number
+
+ #i used f string formatting to display the final answer in a format that's more readable
+ #the variable name holding my answer to the subtraction is put in a curly bracket and placed at the
+ #position where i want it to be
+ print(f'The result is {result}')
+
+#call your function
+if __name__ == '__main__':
+ main()
+
+#----------------------------------------------------------
\ No newline at end of file
diff --git a/subtract_numbers/title.txt b/subtract_numbers/title.txt
new file mode 100644
index 0000000..eb2976b
--- /dev/null
+++ b/subtract_numbers/title.txt
@@ -0,0 +1 @@
+The title of this solved example is Subtract numbers and it falls under the Sandcastles problem.
From ada0fea1fe8f1f79a985433b11eeb47d4e51d4c9 Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Fri, 24 Apr 2020 20:13:25 +0100
Subject: [PATCH 03/25] Delete credit.txt
---
subtract_numbers/credit.txt | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 subtract_numbers/credit.txt
diff --git a/subtract_numbers/credit.txt b/subtract_numbers/credit.txt
deleted file mode 100644
index b869b75..0000000
--- a/subtract_numbers/credit.txt
+++ /dev/null
@@ -1 +0,0 @@
-The example was solved by Mbaoma Chioma Mary (Section Leader for Section 223)
\ No newline at end of file
From a2cdaa43fcf04d7e5697dbf271d7bd2058cec32c Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Fri, 24 Apr 2020 20:13:35 +0100
Subject: [PATCH 04/25] Delete index.html
---
subtract_numbers/index.html | 15 ---------------
1 file changed, 15 deletions(-)
delete mode 100644 subtract_numbers/index.html
diff --git a/subtract_numbers/index.html b/subtract_numbers/index.html
deleted file mode 100644
index 5a17664..0000000
--- a/subtract_numbers/index.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Subtract numbers
-
-
-Write a program in the file subtract_numbers.py that reads two real numbers from
-the user and prints the first number minus the second number. You can assume the
-user will always enter valid real numbers as input (negative values are fine). Yes, we
-know this problem is really similar to a problem we did in class – that’s why this
-problem is a sandcastle!
-
-
-
\ No newline at end of file
From 984cb6ca43220220af2117b57a44c1a5b2bf884c Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Fri, 24 Apr 2020 20:13:46 +0100
Subject: [PATCH 05/25] Delete soln.py
---
subtract_numbers/soln.py | 26 --------------------------
1 file changed, 26 deletions(-)
delete mode 100644 subtract_numbers/soln.py
diff --git a/subtract_numbers/soln.py b/subtract_numbers/soln.py
deleted file mode 100644
index 80d76cb..0000000
--- a/subtract_numbers/soln.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#subtract numbers
-#a python script which accepts two numbers from the user,
-#and subtracts the second from the first
-
-#define the function
-def main():
- #accept the first input
- #float keyword converts the input to a decimal number for uniformity
- first_number = float(input('Kindly enter a number: '))
-
- #accept the second input
- second_number = float(input('Kindly enter another number: '))
-
- #subtract the second input from the first input
- result = first_number - second_number
-
- #i used f string formatting to display the final answer in a format that's more readable
- #the variable name holding my answer to the subtraction is put in a curly bracket and placed at the
- #position where i want it to be
- print(f'The result is {result}')
-
-#call your function
-if __name__ == '__main__':
- main()
-
-#----------------------------------------------------------
\ No newline at end of file
From 4d93ebb81ce84b4d9df63c1ebb9bd04ead054bf2 Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Fri, 24 Apr 2020 20:13:56 +0100
Subject: [PATCH 06/25] Delete title.txt
---
subtract_numbers/title.txt | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 subtract_numbers/title.txt
diff --git a/subtract_numbers/title.txt b/subtract_numbers/title.txt
deleted file mode 100644
index eb2976b..0000000
--- a/subtract_numbers/title.txt
+++ /dev/null
@@ -1 +0,0 @@
-The title of this solved example is Subtract numbers and it falls under the Sandcastles problem.
From 8f0c8b2abe32a8b5886c803ed2a9113b2782a06b Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Fri, 24 Apr 2020 20:14:37 +0100
Subject: [PATCH 07/25] Create index.html
---
examples/subtract_numbers/index.html | 1 +
1 file changed, 1 insertion(+)
create mode 100644 examples/subtract_numbers/index.html
diff --git a/examples/subtract_numbers/index.html b/examples/subtract_numbers/index.html
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/examples/subtract_numbers/index.html
@@ -0,0 +1 @@
+
From d8292f6c7c5b387aab07256c5260776df7471dad Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Fri, 24 Apr 2020 20:15:05 +0100
Subject: [PATCH 08/25] Add files via upload
---
examples/subtract_numbers/credit.txt | 1 +
examples/subtract_numbers/index.html | 16 +++++++++++++++-
examples/subtract_numbers/soln.py | 26 ++++++++++++++++++++++++++
examples/subtract_numbers/title.txt | 1 +
4 files changed, 43 insertions(+), 1 deletion(-)
create mode 100644 examples/subtract_numbers/credit.txt
create mode 100644 examples/subtract_numbers/soln.py
create mode 100644 examples/subtract_numbers/title.txt
diff --git a/examples/subtract_numbers/credit.txt b/examples/subtract_numbers/credit.txt
new file mode 100644
index 0000000..b869b75
--- /dev/null
+++ b/examples/subtract_numbers/credit.txt
@@ -0,0 +1 @@
+The example was solved by Mbaoma Chioma Mary (Section Leader for Section 223)
\ No newline at end of file
diff --git a/examples/subtract_numbers/index.html b/examples/subtract_numbers/index.html
index 8b13789..5a17664 100644
--- a/examples/subtract_numbers/index.html
+++ b/examples/subtract_numbers/index.html
@@ -1 +1,15 @@
-
+
+
+
+
+ Subtract numbers
+
+
+Write a program in the file subtract_numbers.py that reads two real numbers from
+the user and prints the first number minus the second number. You can assume the
+user will always enter valid real numbers as input (negative values are fine). Yes, we
+know this problem is really similar to a problem we did in class – that’s why this
+problem is a sandcastle!
+
+
+
\ No newline at end of file
diff --git a/examples/subtract_numbers/soln.py b/examples/subtract_numbers/soln.py
new file mode 100644
index 0000000..80d76cb
--- /dev/null
+++ b/examples/subtract_numbers/soln.py
@@ -0,0 +1,26 @@
+#subtract numbers
+#a python script which accepts two numbers from the user,
+#and subtracts the second from the first
+
+#define the function
+def main():
+ #accept the first input
+ #float keyword converts the input to a decimal number for uniformity
+ first_number = float(input('Kindly enter a number: '))
+
+ #accept the second input
+ second_number = float(input('Kindly enter another number: '))
+
+ #subtract the second input from the first input
+ result = first_number - second_number
+
+ #i used f string formatting to display the final answer in a format that's more readable
+ #the variable name holding my answer to the subtraction is put in a curly bracket and placed at the
+ #position where i want it to be
+ print(f'The result is {result}')
+
+#call your function
+if __name__ == '__main__':
+ main()
+
+#----------------------------------------------------------
\ No newline at end of file
diff --git a/examples/subtract_numbers/title.txt b/examples/subtract_numbers/title.txt
new file mode 100644
index 0000000..eb2976b
--- /dev/null
+++ b/examples/subtract_numbers/title.txt
@@ -0,0 +1 @@
+The title of this solved example is Subtract numbers and it falls under the Sandcastles problem.
From af82a656599ae9a5e1b4092c3d75ea9cb54c819b Mon Sep 17 00:00:00 2001
From: "Mbaoma Chioma (Omarrr)" <49791498+Mbaoma@users.noreply.github.com>
Date: Sat, 25 Apr 2020 02:34:21 +0100
Subject: [PATCH 09/25] Update index.html
Added a sample run of the program
---
examples/subtract_numbers/index.html | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/examples/subtract_numbers/index.html b/examples/subtract_numbers/index.html
index 5a17664..485521f 100644
--- a/examples/subtract_numbers/index.html
+++ b/examples/subtract_numbers/index.html
@@ -9,7 +9,13 @@
the user and prints the first number minus the second number. You can assume the
user will always enter valid real numbers as input (negative values are fine). Yes, we
know this problem is really similar to a problem we did in class – that’s why this
-problem is a sandcastle!
+problem is a sandcastle!
+A sample run of the program is shown below:
+This program subtracts one number from another.
+Enter first number: 5.5
+Enter second number: 2.1
+The result is 3.4
+