Part of the whole


#1

hi actually i'm very disappointed because i'm almost didn't answer any thing correctly without your help and now i'm having another problem with this code


#2

Hi you should indent the return statement like the for loop.


#3

can't understand this correctly please explain


#4

can you post your code?


#5

thanks alot for your care i have finished this course and now i'm building a battle ship game :slight_smile:


#6

def get_letter_grade(score):
if score >=90:
return "A"
elif score >=80:
return "B"
elif score >=70:
return "C"
elif score >=60:
return "D"
else:
return "F"
print get_letter_grade(get_average(lloyd))
def get_class_average(students):
students=(lloyd,alice,tyler)
results=[]
for student in students:
results.append(get_average(student))
return average[results]

is this right


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.