Given an collection as 10, 12, 8, 5, 5. The objective is to find the average of numbers from the collection of numbers. The below program will do so
from System import *
from System.Collections.Generic import *
from System.Linq import *
class Program(object):
def Main(args):
Console.WriteLine(List[int](10, 12, 8, 5, 5).Average())
Console.ReadKey()
Main = staticmethod(Main)
Output: 8