diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..c35aee7 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ +Submission + +⚠️ THIS IS A PULL REQUEST TEMPLATE! ⚠️ This helps you complete a pull request. Please follow the instructions below. + +## Submission Checklist ✅ +If you are submitting, please complete the below checklist. Failure to follow these instructions may result in your pull request being closed without review and may affect your submission.😭 + +- [ ] I read the instructions before proceeding. +- [ ] I named my `submission` folder after my Matric No. +- [ ] I have applied the `submission` label to my pull request. +- [ ] This PR was directed to the`submission branch` and not `main`. +- [ ] I understand that a reviewer will merge my pull request after review and that I must not merge a pull request myself. diff --git a/README.md b/README.md index ad102dd..3ec846d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ -# Python Language +# Python Language :snake: [![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) -This repository is strictly for individuals who wrote their codes with Python Language - -## How do I submit my project file/code? +This repository is strictly for individuals who wrote either their CGPA or Transcript Generator projects or codes with Python Language. - Enter the appropriate repository matching your code sample @@ -13,14 +11,14 @@ This repository is strictly for individuals who wrote their codes with Python La - Head on to the forked repository if using remote access or the cloned repository if making changes from your local machine. -- Make sure to avoid making changes to **main branch** by switching to **submissions branch**. Use ``git switch submissions`` or ``git checkout submissions`` to switch to the submission branch first - -- Navigate to submissions folder in the repository under the **submissions branch** +- Navigate to submissions directory in the repository inside C folder -- Create a new folder inside **submissions** folder with your *Matriculation Number* as the folder name Example: (Folder name): ENG1503XXXX +- Create a new folder inside submissions with your *Matriculation Number* as the folder name Example: (Folder format): ENG1503XXXX - Place all related codes in this personally created folder -- Commit and Push your works and updates to the submission branch you've been working on +- Commit and Push your works and updates + +- When finally done, create a PR to the **submission branch** with the PR title "**submission**" after correctly checking everything on the PR template -- When finally done, create a PR and merge your work after correctly checking everything on the PR template +[![Open Source Love png3](https://badges.frapsoft.com/os/v3/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/) diff --git a/submissions/ENG1603884/gp calculator.py b/submissions/ENG1603884/gp calculator.py new file mode 100644 index 0000000..e1ede57 --- /dev/null +++ b/submissions/ENG1603884/gp calculator.py @@ -0,0 +1,43 @@ +''''This code calculates the cgpa of students''' + +print('Enter the total number of courses you offer:') +course_number = int(input()) + +# creates empty lists to store the inputs from the users +courses = [] +grade_points = [] +credit_points = [] +sub_totalList = [] + + +for a in range(course_number):#a loop that loops according to the number of courses offered + + + def convertGrade(grade):#function that converts the grade of the student to grade points + if grade == 'A' or grade == 'a': + return 5 + elif grade == 'B' or grade == 'b': + return 4 + elif grade == 'C' or grade == 'c': + return 3 + elif grade == 'D' or grade == 'd': + return 2 + elif grade == 'F' or grade == 'f': + return 0 + + print('Enter the course code:') + course = input() + courses.append(course)#adds the input to the course list + print('Enter the course credit:') + credit = int(input()) + credit_points.append(credit)#adds input to the credit_points list + print('Enter your grade for the course:') + grade = input() + convertGrade(grade)#the function to convert the grades is called + sub_total = convertGrade(grade)*credit + sub_totalList.append(sub_total)#adds input to the sub_totalList list + grade_points.append(grade)#adds input to the grade_points list + + +gpa = sum(sub_totalList)/sum(credit_points)#gpa formula +print("Your GP is " + gpa) diff --git a/submissions/folder/code.md b/submissions/ENG1XXXXXX/code.py similarity index 100% rename from submissions/folder/code.md rename to submissions/ENG1XXXXXX/code.py