0
How to do a program for this in HTML and python
In assigning grades to the students. The mean score of three subjects is to graded into 'A', 'B', 'C' or 'D' or 'F' depending upon the marks scored. For the score. 90 to 100, 'A' is graded. For score 80 to 90, 'B' is graded. For the score 70 to 80, 'C' is graded. For the score 60 to 70, 'D' is graded. For the score 60 'F' is graded. Input: Input contains the marks obtained by student in 3 subjects separated by a space. Output: Output the grade of the student
10 Answers
+ 1
Congrats!
+ 2
what is actually you want to do? combining HTML & python code? if yes, then you have to use a python web application framework like 'Django'.
+ 1
no I need python
+ 1
I mean I need python or html
+ 1
if you give python it will be better
+ 1
marks = input().split(" ")
def grade(x):
if x>=90 and x<=100:
return "A"
elif x>=80 and x<90:
return "B"
elif x>=70 and x<80:
return "C"
elif x>=60 and x<70:
return "D"
elif x<60 and x>0:
return "F"
else:
return "Invalid Mark"
for i in range(len(marks)):
print(grade(int(marks[i])))
+ 1
thanks
+ 1
thanks for your reply
+ 1
I also found the HTML code on online
https://code.sololearn.com/WZ4t6dtu4TT5/?ref=app
0
and please give a upvote for my question