diff options
| author | mo khan <mo@mokhan.ca> | 2025-01-12 18:56:10 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-01-12 18:56:10 -0700 |
| commit | 794d45b1290fddcf0508495b53fc6d1d9b2c9bfe (patch) | |
| tree | e01f33fe75c57c9e6e1df361667c98d73c29ff65 | |
| parent | 09b8ca567b4ce4f2012c050eb57aa7ee61651f0c (diff) | |
Add code comments and I hate adding code comments.
| -rw-r--r-- | projects/2/README.md | 9 | ||||
| -rwxr-xr-x | projects/2/prog1.py | 2 | ||||
| -rwxr-xr-x | projects/2/prog2.py | 2 | ||||
| -rwxr-xr-x | projects/2/prog3.py | 2 | ||||
| -rwxr-xr-x | projects/2/prog4.py | 5 |
5 files changed, 14 insertions, 6 deletions
diff --git a/projects/2/README.md b/projects/2/README.md index b240834..b6e5eff 100644 --- a/projects/2/README.md +++ b/projects/2/README.md @@ -75,7 +75,8 @@ Save your programs in the Python folder on your hard disk. Go to A Beginner’s Python Tutorial, and work through the first seven lessons. -Please note that the tutorial describes running programs for an earlier version of Python, and follows: +Please note that the tutorial describes running programs for an earlier version +of Python, and follows: > "Edit" menu-> "Run Script" @@ -83,7 +84,8 @@ In later versions of Python, programs are run as follows: > "Run" menu-> "Run Module" (or simply hit F5) -Note: If you need more help, the internet has several instructive sites, for example, www.learnpython.org/. +Note: If you need more help, the internet has several instructive sites, for +example, www.learnpython.org/. ## Programs @@ -109,7 +111,8 @@ Program 1—Math Functions ### PROGRAM 1—MATH FUNCTIONS -Write an algorithm for a program that shows the use of all six math functions. Write, test, and debug the program using Python. +Write an algorithm for a program that shows the use of all six math functions. +Write, test, and debug the program using Python. SAMPLE OUTPUT (not including author/program information) diff --git a/projects/2/prog1.py b/projects/2/prog1.py index 28e03f2..6df82be 100755 --- a/projects/2/prog1.py +++ b/projects/2/prog1.py @@ -3,7 +3,7 @@ print(""" Program author: mo khan ID: 3431709 -Program 1 - Math Functions +PROGRAM 1-MATH FUNCTIONS """) # Add two numbers and print the result diff --git a/projects/2/prog2.py b/projects/2/prog2.py index 0de066b..b8504cc 100755 --- a/projects/2/prog2.py +++ b/projects/2/prog2.py @@ -3,7 +3,7 @@ print(""" Program author: mo khan ID: 3431709 -Program 2 - Using Input +PROGRAM 2-USING INPUT """) # Read from stdin and assign value to a variable diff --git a/projects/2/prog3.py b/projects/2/prog3.py index c491a71..9b1bd6b 100755 --- a/projects/2/prog3.py +++ b/projects/2/prog3.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +# This program requests a password, and then asks the user for their name. + print(""" Program author: mo khan ID: 3431709 diff --git a/projects/2/prog4.py b/projects/2/prog4.py index cc70d4e..636cc7f 100755 --- a/projects/2/prog4.py +++ b/projects/2/prog4.py @@ -1,9 +1,12 @@ #!/usr/bin/env python +# This program can calculate the area and perimeter of a square, rectangle and +# square. A text user interface (TUI) is provided as well. + print(""" Program author: mo khan ID: 3431709 -Program 4 - Functions +PROGRAM 4-FUNCTIONS """) def menu(): |
