Find a Nth highest or lowest numbers in a given series of Doubles using Python

Rajnilari2015
Posted by Rajnilari2015 under Python category on | Points: 40 | Views : 105
from System import *
from System.Collections.Generic import *
from System.Linq import *

class Program(object):
def Main(args):
lstNumbers = List[Double](1, 2.06, 34, -4, 5.90, 61.9, 7.8, 8, 9, 18.0, 23.7)
minNum = lstNumbers.Min() #lowest number
maxNum = lstNumbers.Max() #highest number
Console.WriteLine("Min = {0} , Max = {1}", minNum, maxNum)
Console.ReadKey(True)

Main = staticmethod(Main)


/*
Min = -4 , Max = 61.9
*/

Comments or Responses

Login to post response