Why do these scores need to be saved as floats?


#1

Question

Why do these scores need to be saved as floats?

Answer

Later on in this project we’ll be creating a function to average the grades earned by each student. To average numbers, if we worked with integers, we would get inaccurate results because of how integers divide. Using floats ensures that we return only the most accurate of averages!


FAQ: Learn Python: Student Becomes the Teacher - What's the Score?