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

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

Comments or Responses

Login to post response