medium
Debug Python Script
Identify and fix a logic error in a provided Python snippet.
📝 Promptens innehåll
Analyze the following Python function designed to calculate the average of a list of numbers. It is currently returning a division by zero error for empty lists and incorrect values for non-integer inputs. Rewrite the function to handle these edge cases gracefully and include comments explaining the changes.