Forum in maintenance, we will back soon 🙂
function homework.
Â
I think you can't remember beginners' mind anymore..
Â
not happy coding to me..
Â
what does that mean?? you just put questions and answers. but I don't get it..
Hi Jay. what exactly you didnt understand here?
Â
Â
def calculate_average(numbers) > is fine.
sum_of_numbers = 0 > where does it come from??
Â
for number in numbers : > you just put it your way.
sum of numbers += number > what does that mean?
Â
average = sum of numbers / len(numbers)Â
len(numbers) > length (numbers) , right? still not sure what that mean
Â
return average > where does it come from??
Â
number = [1,2,3,4,5] > fine
print(calculate_average(numbers)) > not sure.
Â
-------------
Â
I put what I got and I didn't /Â
Â
I asked many things within short time. thanks for your helping me . I guess you might know who I am haha.. still keep asking to you. thanks.
Â
Â
Â
Â
I think you will try again and watch the python lectures from the beginning, then come back.
@jay-kim The pictured error message is due to indentation issues on lines 7 and 9. You need to tab both of those so that they are within the calculate_average function. Python uses tabs to define where the action takes place. As you have it written, the return statement is out of scope for the global space.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
@ssadvisor thanks for your advice. but didn't get what you meant. haha..