Write a program in Python to find the average of numbers from a collection of numbers

Posted by Rajnilari2015 under Python category on | Points: 40 | Views : 150
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())

Main = staticmethod(Main)

Output: 8

Comments or Responses

Login to post response