Commit e3f6747

mo khan <mo@mokhan.ca>
2025-01-10 22:12:25
Complete program 1 for project 2
1 parent 41022a0
projects/2/prog1.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+print("""
+Program author: mo khan
+ID: 3431709
+Program 1 - Math Functions
+""")
+
+# Add two numbers and print the result
+print('ADDITION: 2+2={}'.format(2+2))
+
+# Subject one number from another and print the result
+print('SUBTRACTION: 4-2={}'.format(4-2))
+
+# Multiple two numbers and print the result
+print('MULTIPLICATION: 4*2={}'.format(4*2))
+
+# Divide one number from another and print the result
+print('DIVISION: 4/2={}'.format(4/2))
+
+# Compute the exponent and print the result
+print('EXPONENT: 2**3={}'.format(2**3))
+
+# Compute the remainder using modulus division and print the result
+print('REMAINDER: 5%2={}'.format(5%2))
projects/2/prog2.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+print("""
+Program author: mo khan
+ID: 3431709
+Program 2 - Using Input
+""")
projects/2/prog3.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+print("""
+Program author: mo khan
+ID: 3431709
+Program 3 - Loops And If Conditions
+""")
projects/2/prog4.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+print("""
+Program author: mo khan
+ID: 3431709
+Program 4 - Functions
+""")
projects/2/README.md
@@ -97,8 +97,9 @@ beginning to describe the function of the program. All programs should start
 with a display of your name, student id#, and the program number and name.
 When storing the files, name them as `prog1.py,` `prog2.py`, etc.
 
+### EXAMPLE OF AUTHOR/PROGRAM INFORMATION OUTPUT
+
 ```bash
-EXAMPLE OF AUTHOR/PROGRAM INFORMATION OUTPUT
 Program author: B. Rubble
 
 ID#: 1234567