Hello everyone, I just get stuck in 7 exercise:

I should say that my code works, but there are some questions to make it better...

- How to check if argument is number when I define function?

def get_letter_grade(score):

====if score % 1 = 0:

Is this the only one way to check if arg is int? I hope there's another one more logical for ex

def get_letter_grade(IT_IS_MUST_BE_INT_BRO(score)):

Have Python got something like this? - My code prints "This is not int, bro" when I ask it to calculate letter_grade. Just take a look:

def average(numbers):

total = sum(numbers)

total = float(total)

total = total / len(numbers)

return total

def get_average(student):

homework = average(student["homework"])

quizzes = average(student["quizzes"])

tests = average(student["tests"])

return homework * 0.1 + quizzes * 0.3 + tests * 0.6

def get_letter_grade(score):

if score % 1 == 0:

if score >= 90:

return "A"

elif score >= 80:

return "B"

elif score >= 70:

return "C"

elif score >= 60:

return "D"

else:

return "F"

else:

return "This isn't int, bro..."

print (get_letter_grade(get_average(lloyd)))

But why?? It has input number, and %1 should == 0. Then it should check if n >= 90 etc. Why it returns else statement?