leetle

Daily challenge for 2025-07-05

186. Calculate Average of Numbers

Write a function solve that takes a list of integers (which may include negatives) and returns their average as a floating-point number. If the list is empty, return 0.

Example:
Input: [1, 2, 3]
Output: 2.0

Run this challenge interactively in Python or JavaScript when the app loads.