https://github.com/german-boop/student-grades-ranking
Rank students by grades in descending order using Python; beginner-friendly and PEP 8 compliant.
https://github.com/german-boop/student-grades-ranking
beginner-friendly dictionary first-pull-request first-timers hacktoberfest learning python sorting
Last synced: 8 days ago
JSON representation
Rank students by grades in descending order using Python; beginner-friendly and PEP 8 compliant.
- Host: GitHub
- URL: https://github.com/german-boop/student-grades-ranking
- Owner: german-boop
- License: mit
- Created: 2025-12-22T04:49:24.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-12-22T05:17:07.000Z (5 months ago)
- Last Synced: 2025-12-23T16:06:07.811Z (5 months ago)
- Topics: beginner-friendly, dictionary, first-pull-request, first-timers, hacktoberfest, learning, python, sorting
- Language: Python
- Homepage: https://github.com/german-boop/Student-Grades-Ranking
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Student-Grades-Ranking
Rank students by grades in descending order using Python; beginner-friendly and PEP 8 compliant.
# 🎓 Student Grades Ranking
A simple and beginner-friendly Python script to **rank students based on their grades**.
This project demonstrates the use of:
- Python dictionaries for storing student names and grades
- Sorting by dictionary values in descending order
- Enumerate to print rankings
- Clean and readable code following PEP 8 standards
Perfect for Python learners who want to practice basic data structures, sorting, and formatted output.
# 🎓 Student Grades Ranking



A simple and beginner-friendly Python script to **rank students based on their grades**.
This project demonstrates:
- Python dictionaries for storing student names and grades
- Sorting by dictionary values in descending order
- Using `enumerate` to print rankings
- Clean and readable code following PEP 8 standards
Perfect for Python learners who want to practice **data structures, sorting, and formatted output**.
---
## 📂 Project Structure
# 🎓 Student Grades Ranking



A simple and beginner-friendly Python script to **rank students based on their grades**.
This project demonstrates:
- Python dictionaries for storing student names and grades
- Sorting by dictionary values in descending order
- Using `enumerate` to print rankings
- Clean and readable code following PEP 8 standards
Perfect for Python learners who want to practice **data structures, sorting, and formatted output**.
---
## 📂 Project Structure
├── 📄 main.py
├── 📄 README.md
├── 📄 LICENSE
└── 📄 .gitignore
- `main.py` → Python script to rank students
- `README.md` → Project documentation
- `LICENSE` → MIT License file
- `.gitignore` → Ignore unnecessary files (e.g., `__pycache__`)
---
## ✨ Features
- ✅ Stores student names and grades in a dictionary
- ✅ Sorts students by grade in descending order
- ✅ Prints students with ranking using `enumerate`
- ✅ Beginner-friendly and easy to extend
---
## 🚀 Quick Start
### 1. Clone the repository
```bash
git clone https://github.com/username/student_grades.git
cd student_grades
# Dictionary with student grades
students = {
"Ali": 18,
"Sara": 20,
"Reza": 16,
"John": 19
}
# Sort students by grade in descending order
sorted_students = sorted(students.items(), key=lambda item: item[1], reverse=True)
# Print students with ranking
print("Ranking of students by grade:")
for rank, (name, grade) in enumerate(sorted_students, start=1):
print(f"{rank}. {name}: {grade}")
🖼 Example Output
Ranking of students by grade:
1. Sara: 20
2. John: 19
3. Ali: 18
4. Reza: 16