Write A Python Program To Check student is Pass or Fail In Exam
Write a Python Program To Find Out Whether a Student is pass or fails if it requires a total of 40% And at least 33 in subjects to Pass Assume 3 Subject And take Marks as an Input From the User. Code: sub1 = int ( input ( "Enter The Mark Of Subject 1 :" )) sub2 = int ( input ( "Enter The Mark Of Subject 2 :" )) sub3 = int ( input ( "Enter The Mark Of Subject 3 :" )) if sub1 < 33 or sub2 < 33 or sub3 < 33 : print ( "Fail Due To You secured Less Then 33 Marks In Subject." ) elif (( sub1 + sub2 + sub3 ) / 3 ) < 40 : print ( "You Are Fail Due To You Got Less Rhen 40% marks" ) else : print ( "You Are Passed!" ) Output: Enter The Mark Of Subject 1 :25 Enter The Mark Of Subject 2 :34 Enter The Mark Of Subject 3 :55 Fail Due To You secured Less Then 33 Marks In Subject. Enter The Mark Of Subject 1 :85 Enter The Mark Of Subject 2 :99 Enter The Mark Of Subject 3 :25 Fail Due To You secured Less Th...
Comments
Post a Comment