Hi,
I get the error 'floating except (core dumped) at the end of this program when I run it.
EX: I input 2 for labs and input a 4 and a 6 for points. At the end of the program I expected f to compute, however once the program got out of the while loop, it gives the error mentioned above.
Could anyone explain to me why I got this error?
This error will not happen if f is not there (either I comment it out, or I delete it).
Line 6, I would make all variables "doubles" or at least "floats", I tend to prefer doubles.
Line 10 along with line 15 will leave "labs" at zero when the while loop finishes making line 18 a divide by zero.
I created a new variable to use in lines 10 15 and 17 so "labs" would not be changed before the calculation on line 18. Then if "f" is to be an average of "points" I believe you are going about it the wrong way. Unless I have the wrong idea here.