Python Challenge Projects for Beginners – Hinglish Guide (Student Grade Calculator )
Python Challenge Projects for Beginners – Hinglish Guide (Student Grade Calculator )
- Student name
- Marks in 3 subjects (Math, Science, English)
- Total marks
- Average marks
>= 90→ Grade A
>= 75→ Grade B
>= 50→ Grade C
< 50→ Fail
Student: RavindraTotal Marks: 250Average: 83.33Grade: BBonus Features:
- Use a for loop to take marks for 3 subjects.
- Validate input (marks should be between 0 and 100).
- Use f-string for neat output.
- Write the code.
- Share it here for review.
- I’ll give feedback and suggest improvements.
✅ Code:
# Student Grade Calculator
Student Grade Calculator
Python program that:
-
Takes user input:
-
Calculates:
-
Decides grade using
if-elif-else: -
Prints output like:
✅ Your Task:
Student_name = input("Enter Student Name: ")
Math = int(input("Enter marks for Math: "))
Science = int(input("Enter marks for Science: "))
English = int(input("Enter marks for English: "))
Total_marks = Math + Science + English
Average_marks = Total_marks / 3
print(f"Student: {Student_name}")
print(f"Total Marks: {Total_marks}")
print(f"Average: {Average_marks:.2f}")
if Average_marks >= 90:
Grade = 'A'
elif Average_marks >= 75:
Grade = 'B'
elif Average_marks >= 50:
Grade = 'C'
else:
Grade = 'Fail'
print(f"Grade: {Grade}")