Apr-26-2018, 09:50 PM
so i need to write a code that will do the following
#ask for name
#ask for health score
#ask for grade
#ask for economic output
#if the grade is A OR economic output is above 85 print they meet the criteria
#if the health score and economic output are both over 60 and grade is at least a C print congratulations
#otherwise print sorry
I have written the below but it doesnt work. It doesnt print the correct statements at the end.
can someone show me where i am going wrong please.
name = raw_input("Enter your name:")
health = raw_input("Enter your standardised health score:")
grade = raw_input("Enter your standardised grade:")
economic = raw_input("Enter your standardised economic output score:")
if grade == "A" or economic >85:
print name, "you meet the exceptional criteria."
elif health and economic >60 and grade >= "C":
print "Congratualtions", name, "you have been selected."
else:
print "Sorry", name, "you are not permitted to board the ship."
#ask for name
#ask for health score
#ask for grade
#ask for economic output
#if the grade is A OR economic output is above 85 print they meet the criteria
#if the health score and economic output are both over 60 and grade is at least a C print congratulations
#otherwise print sorry
I have written the below but it doesnt work. It doesnt print the correct statements at the end.
can someone show me where i am going wrong please.
name = raw_input("Enter your name:")
health = raw_input("Enter your standardised health score:")
grade = raw_input("Enter your standardised grade:")
economic = raw_input("Enter your standardised economic output score:")
if grade == "A" or economic >85:
print name, "you meet the exceptional criteria."
elif health and economic >60 and grade >= "C":
print "Congratualtions", name, "you have been selected."
else:
print "Sorry", name, "you are not permitted to board the ship."