Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/CNA340.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
37 changes: 37 additions & 0 deletions letterGrade.py
Original file line number Diff line number Diff line change
@@ -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()