From af180a2b2926addac21c850037c268e2aaf8a12a Mon Sep 17 00:00:00 2001 From: Nmclendon <132414693+Nmclendon@users.noreply.github.com> Date: Tue, 2 May 2023 20:19:24 -0700 Subject: [PATCH 1/3] Update README.md --- README.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f6a26f4..a03c3be 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,29 @@ -# Project Title +# Number to Letter Grade -One Paragraph of project description goes here. +This code takes a number between 0-100 and determines a letter grade for a student. ## Getting Started -These instructions will [do something] on your local machine for [development/experimentation/demo]. +These instructions will run this code for translating number grades to letter grades with the letterGrade.py script. ### Prerequisites -[Project] requires [software and version] to run, with [additional packages, libaries, or mods]. The commands below will [upgrade OS and install the prerequisites, or do something else] +letterGrade.py requires Python 3 to run. You can install Python 3 by following the link below. ``` -sudo apt update -sudo apt upgrade -sudo apt install package1 package2 +https://www.python.org/downloads/ ``` ## Running + Once installed you can run the program with the following command ``` -python cna_demo.py +python3 letterGrade.py ``` -Add any additional ways to run the program below - -``` -python cna_demo.py test.txt -``` +The program will prompt you to enter a number between 0 and 100, if you enter a number below 0 or above 100 you will be prompted again to enter a number between 0 and 100. ## Thanks -Provide thank yous and attributions here. If someone helped you, you looked at another repository, or another article, provide it here. + +Thank you for checking out my code! I hope you enjoy it! I couldn't have done it without the wonderful instructors in the CNE program at Renton Technical College. From e7259d6a8a170759803276ec4bdedb96e11d3004 Mon Sep 17 00:00:00 2001 From: Nmclendon Date: Tue, 2 May 2023 20:25:35 -0700 Subject: [PATCH 2/3] Adding letterGrade.py to this repository Adding a copy letterGrade.py to this repository to accompany the README file. --- letterGrade.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 letterGrade.py diff --git a/letterGrade.py b/letterGrade.py new file mode 100644 index 0000000..416d182 --- /dev/null +++ b/letterGrade.py @@ -0,0 +1,37 @@ +def letter_grade(number): + +#Makes sure the the input is between 0 and 100. + while number < 0 or number > 100: + number = int(input("Enter your grade here (overall percent between 0 and 100), do not include the % symbol")) + +#Takes number and returns letter grade. + if number <= 100 and number >= 90: + print('A') + return + elif number <90 and number >= 87: + print('B+') + return + elif number < 87 and number >= 80: + print('B') + return + elif number < 80 and number >= 77: + print('C+') + return + elif number < 77 and number >= 70: + print('C') + return + elif number < 70 and number >= 67: + print('D+') + return + elif number < 67 and number >= 60: + print('D') + return + else: + print('F') + return + +def main(): + number_grade = int(input("Enter your grade here (overall percent between 0 and 100), do not include the % symbol")) + letter_grade(number_grade) + +main() \ No newline at end of file From 55f9e197a88e58c0289235e8e206f1f2aef088ac Mon Sep 17 00:00:00 2001 From: Nmclendon Date: Tue, 9 May 2023 18:50:15 -0700 Subject: [PATCH 3/3] update? Update from opening in pycharm --- .idea/CNA340.iml | 8 +++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ .idea/misc.xml | 4 +++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ .idea/workspace.xml | 34 +++++++++++++++++++ 6 files changed, 66 insertions(+) create mode 100644 .idea/CNA340.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/CNA340.iml b/.idea/CNA340.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/CNA340.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d56657a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..3ed0976 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..9e485bd --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + 1683683291220 + + + + \ No newline at end of file