Question
Directions (Part 4a) Sign in tor GitHub and pull latest updates. In the activity4 folder there should be an activity4.py program page. Erase the current
Directions
- (Part 4a) Sign in tor GitHub and pull latest updates. In the activity4 folder there should be an activity4.py program page. Erase the current code on the page and create the code to complete the following requirements:
Calculates the Letter grade for a class in a nearby university assuming a scale of 1000 points for the class and uses the grade from the syllabus:
Points | Grade |
92- 100% | A |
88- 91.99% | B+ |
82-87.99% | B |
78- 81.99% | C+ |
70- 77.99% | C |
60 - 69.99% | D |
< 60% | F |
To do this program you need to define 3 functions: They are
def main():
The main function first calls the display title function which displays the title. Next the main functions requires the user to input the total number of points earned. Main then passes the total_points to the get_grade which uses if, elif, else to return the correct letter grade. The main function then prints the letter grade and asks the program should continue. If yes, run the program again or print Bye.
def display_title():
Displays the title of the program when called.
get_grade():
This functions receives the total_points from the main() and returns the letter grade.
Be sure to add try - except to ensure that only valid values are entered.
2. (Part 4b) There should also be a file called activity4b.py Use this for the following program.
Create a simple metropolitan delivery cost calculator for a new mail and small package courier service in Omaha
1. Minimum cost pick up and delivery of a 1.99 pounds or less package within Omaha City Limits with a guaranteed delivery time of 2 hours is $7.95
2. Express time of one hour or less adds $2.00 to the delivery price.
3. Add $1.00 for every pound over 1.99 lbs up to 49.99 lbs. The company does not accept a single package over 50 lbs.
To do this program you need to define 3 functions: They are
def main():
The main function first calls the display title function which displays the title. Next the main functions requires the user to input the a 2 for 2 hours or less or a 1 for 1 hour delivery or less. They also must enter the weight of the package in pounds. Main then passes the delivery time indicator(1 or 2) and the weight in pounds to the get_delivery_price which uses if, elif, else and calculations to return the correct the total delivery price for the package. The main function then prints the total delivery price and asks if the program should continue. If yes, run the program again or print Bye.
def display_title():
Displays the title of the program when called.
get_delivery_price():
The get_delivery_price function uses if, elif, else and calculations to return the correct total delivery price for the package and returns it to main for printing.
Be sure to add try - except to ensure that only valid values are entered.
Submitting your assignment
1. When you are happy with your working code push the code to GitHub and be sure your GitHub repository is updated.
2. Create a word document and make one or more screenshots of the code working in the command line (run several different grades through the program and add it to the word document Labeled ISQA 3900 Activity 4.
Rubric
| Exemplary (from 90 to 100%) | Competent (from 80 to 89%) | Acceptable (from 70 to 79%) | Insufficient (below 70%) |
Python Code (max 15 pts) | Functions as described above and has appropriate comments in the code | Generally functions as described above and has some but not all comments | Partially functions as described above and may lack appropriate comments | Does not function as described above and lacks comments |
Git and GitHub (max 5 pts) | One or more commits with all code replicated and appropriate commit comment | .Code updated in GitHub but lacking an appropriate commit comment | Code not updated in GitHub | Code not updated in GitHub |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started