Created
February 3, 2019 11:19
-
-
Save Robofied/b6a22fab09908c9b474a6bafaafa1615 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def student(name,sub1,sub2): | |
avg_marks = (sub1+sub2)/2 | |
if avg_marks >= 80: | |
print("%s is very good student with marks %d" %(name,avg_marks)) | |
## Checking condition if marks is in range(60,80) then student is average. elif (avg_marks<80 and avg_marks> 60): | |
print("%s is average student with marks %d" % (name,avg_marks)) | |
## Checking condition if marks is below 60 then needs improvement | |
else: | |
print("%s needs improvement %d" % (name,avg_marks)) | |
student('Ram', 80, 90) | |
#[Output]: | |
#Ram is very good student with marks 85 | |
student('Seeta',50,30) | |
#[Output]: | |
#Seeta needs improvement 40 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment