Aug-20-2020, 07:10 AM
Hi All,
I have been trying to help my son with his holiday homework.
We have got this far but keep failing to get var2 asked var1 times.
Here is how far we have got.
Var1 = int(input("How many weights do you want to enter?"))
Var2 = int(input("Enter a weight"))
Average = sum(Var2) / len(var1)
for (var2), num (var1)
print average
We want "Enter a weight" asked var1 times and then all the responses averaged.
I appreciate that this requires multiple elements but seem to be making no progress. Any assistance appreciated as we need to understand this function to move on to further questions.
I have been trying to help my son with his holiday homework.
We have got this far but keep failing to get var2 asked var1 times.
Here is how far we have got.
Var1 = int(input("How many weights do you want to enter?"))
Var2 = int(input("Enter a weight"))
Average = sum(Var2) / len(var1)
for (var2), num (var1)
print average
We want "Enter a weight" asked var1 times and then all the responses averaged.
I appreciate that this requires multiple elements but seem to be making no progress. Any assistance appreciated as we need to understand this function to move on to further questions.