DAY 60 — 60 DAY PYTHON CHALLENGE
Complete Project - Report Card
Python mein Complete Project - Report Card banao — Hindi mein step by step
Advertisement
Project kya hai?
Day 60 ka project hai Complete Project - Report Card!
Yeh project banane se aap Python ke important concepts
practice kar payenge. Neeche complete code hai — copy karo aur chalao!
Complete Python Code
python — report_card.py
# Day 60 - Complete Python Project
# Student Report Card System
class Student:
def __init__(self, name, roll):
self.name = name
self.roll = roll
self.subjects = {}
def add_marks(self, subject, marks):
self.subjects[subject] = marks
def total(self):
return sum(self.subjects.values())
def percentage(self):
if not self.subjects:
return 0
return self.total() / len(self.subjects)
def grade(self):
p = self.percentage()
if p >= 90: return "A+ (Outstanding)"
if p >= 80: return "A (Excellent)"
if p >= 70: return "B (Good)"
if p >= 60: return "C (Average)"
if p >= 33: return "D (Pass)"
return "F (Fail)"
def report_card(self):
print(f"\n{'='*45}")
print(f" REPORT CARD")
print(f" Student : {self.name}")
print(f" Roll No : {self.roll}")
print(f"{'─'*45}")
print(f" {'Subject':15} {'Marks':8} {'Result'}")
print(f"{'─'*45}")
for sub, marks in self.subjects.items():
bar = "#" * (marks // 10)
result = "Pass" if marks >= 33 else "Fail"
print(f" {sub:15} {marks:5}/100 {bar} [{result}]")
print(f"{'─'*45}")
print(f" Total : {self.total()}/{len(self.subjects)*100}")
print(f" Percentage : {self.percentage():.1f}%")
print(f" Grade : {self.grade()}")
print(f"{'='*45}")
students = []
SUBJECTS = ["Hindi", "English", "Math", "Science", "Computer"]
print("=== Student Report Card System ===")
while True:
print("\n1. Student add karo")
print("2. Marks add karo")
print("3. Report card dekho")
print("4. Sab students ki report")
print("5. Topper dekho")
print("6. Baahar jao")
ch = input("Choice: ")
if ch == "1":
s = Student(input("Naam: "), input("Roll no: "))
students.append(s)
print(f"Student add hua: {s.name}")
elif ch == "2":
roll = input("Roll no: ")
s = next((x for x in students if x.roll == roll), None)
if s:
print(f"{s.name} ke marks enter karo:")
for sub in SUBJECTS:
marks = int(input(f" {sub}: "))
s.add_marks(sub, marks)
print("Marks save ho gaye!")
else:
print("Student nahi mila!")
elif ch == "3":
roll = input("Roll no: ")
s = next((x for x in students if x.roll == roll), None)
if s: s.report_card()
else: print("Student nahi mila!")
elif ch == "4":
for s in students:
s.report_card()
elif ch == "5":
if students:
t = max(students, key=lambda x: x.percentage())
print(f"\nClass Topper: {t.name}")
print(f"Percentage : {t.percentage():.1f}%")
print(f"Grade : {t.grade()}")
elif ch == "6":
print("\n60 Day Python Challenge Complete!")
print("Aap ek Python developer ban gaye!")
break
OUTPUT
Choice: 1 Naam: Priya Roll no: 101 Student add hua: Priya Hindi: 88 English: 92 Math: 95 Science: 87 Computer: 93 ============================================= REPORT CARD Student : Priya Roll No : 101 ───────────────────────────────────────────── Subject Marks Result ───────────────────────────────────────────── Hindi 88/100 ######## [Pass] Math 95/100 ######### [Pass] ───────────────────────────────────────────── Percentage : 91.0% Grade : A+ (Outstanding) Class Topper: Priya - 91.0% (A+)
Code kaise kaam karta hai?
Day 60 ka Complete Project hai! OOP, Dictionary, next() for search, max() for topper - sab concepts ek saath. 60 din ki Python journey complete ho gayi!
Advertisement
📋 Project ka Introduction
Complete Report Card Project Python ka Day 60 ka project hai. Is project mein aap Python ke important concepts practice karenge jo real-world applications mein bahut use hote hain.
Yeh project beginners ke liye design kiya gaya hai lekin kaafi concepts cover karta hai. Step by step samjho, code chalao, aur khud modify karke practice karo.
Is tarah ke projects banane se aapka Python confidence badh jaata hai aur aap asli problems solve karna seekh jaate hain. Chaliye code samjhte hain!
Yeh project beginners ke liye design kiya gaya hai lekin kaafi concepts cover karta hai. Step by step samjho, code chalao, aur khud modify karke practice karo.
Is tarah ke projects banane se aapka Python confidence badh jaata hai aur aap asli problems solve karna seekh jaate hain. Chaliye code samjhte hain!
🧠 Is Project mein kya seekhoge?
Yeh project banate waqt aap ye Python concepts use karoge:
| Concept | Kya karta hai |
|---|---|
Variables | Data store karna |
Functions | Reusable code blocks |
Loops | Repeat karna |
Conditions | Decisions lena |
Input/Output | User se interact karna |
📝 Code kaise kaam karta hai — Step by Step
Neeche code ki poori logic step-by-step samjhayi gayi hai:
- Problem samjho: Complete Report Card Project mein kya karna hai
- Required variables aur data structures decide karo
- Logic step-by-step likhó
- Code mein implement karo
- Test karo aur bugs fix karo
⚠️ Common Mistakes — Bhool mat jaana!
Beginners yeh galtiyan aksar karte hain — dhyan rakho:
- ⚠️ Indentation sahi rakho — Python mein spaces matter karti hain
- ⚠️ Variables ko use se pehle define karo
- ⚠️ Input ko int()/float() mein convert karo agar number chahiye
- ⚠️ Edge cases handle karo — kya hoga agar user galat input de?
🏋️ Practice Exercises — Aage badho!
Yeh project complete karne ke baad in exercises se practice karo:
- 💡 Complete Report Card Project mein naya feature add karo
- 💡 Code ko functions mein refactor karo
- 💡 Error handling improve karo
- 💡 File mein data save karo
❓ Aksar Pooche Jane Wale Sawal (FAQ)
Q: Complete Report Card Project project kyon banana chahiye?
A: Har project ek naya concept sikhata hai. Practice se hi Python fluent aati hai.
A: Har project ek naya concept sikhata hai. Practice se hi Python fluent aati hai.
Q: Code run nahi ho raha?
A: Indentation check karo, syntax errors dekho, variables define hain ya nahi check karo.
A: Indentation check karo, syntax errors dekho, variables define hain ya nahi check karo.
Q: Kaise improve karein?
A: Pehle basic version complete karo, phir ek ek feature add karte jao.
A: Pehle basic version complete karo, phir ek ek feature add karte jao.