Computer Science, asked by mamtatiwari252529, 2 months ago

Date
Gaathi
WAp to accept the marks of three subjects
Physics, Chemistry and maths.
Display the grade as
per
the given
Condition
condition
above 50 in all three subjects
grade A
above 50 in any two subjects
grade B
above 50 in any one subject
grade C
below 50 in all subjects
grade D​

Answers

Answered by da4729204
0

Answer:

// this is a program in python

physics_marks = int(input("Enter marks in physics : "))

chemistry_marks = int(input("Enter marks in chemistry : "))

maths_marks = int(input("Enter marks in maths : "))

marks_list = [physics_marks,chemistry_marks,maths_marks]

n=0

for i in marks_list:

if i>50:

n+=1

if n==3:

print("Grade A")

elif n==2:

print("Grade B")

elif n==1:

print("Grade C")

else:

print("Grade D")

Similar questions