Medium
Identify Logic Errors in Pseudocode
Find and fix logic mistakes in a provided algorithm.
📝 Konten Prompt
Analyze the following pseudocode for a function that calculates the average of a list of numbers. Identify the logical error and explain how to fix it: Function Average(list): sum = 0; count = 0; For each num in list: sum = sum + num; Return sum / count;