#Name: Laraib Shaikh

#mac id: shaikhl

#Student Number: 1205628

#Lab Section: L09

#Lab Number: 10



#This program interprets the weather simulation data to predict the daily weather

#the program takes 



#rball.py

from random import random



def isHumidityOver(row, percent):

    #returns True if the value of Humidity is above the given percent

    #otherwise returns False

    return row[2] > percent



def isTempUnder(row, temp):

    #returns True if temperature of the row is below the temperature

    return row[1]< temp



def isCloudHeightUnder(row, height):

    #returns the cloudHeight is below the height

    return row[3][-1]<height



def snowChance (data, percent, temp, height):

    Num = 0.

    Den = 0.

    for row in range (1, len(data)):

        #tells the probability of snow if the condition below is True

        if relHumidity > 0.8 and temp < -5 and cloudHeight < 1000:     

            Den+=1

            chance = 3.0/5.0

            #time of snow indicated by each row

            max = []

            min = []

            time = max - min

        #if the above condition is False

        else:

            print "There is no chance of snow"

    #returns the total probability and the chances of snow

    return [chance, time]





"""

the two set of data could be equal if we made the two probability values closer to each other



test cases:



    TEST                          INPUT                EXPECTED OUTPUT

1)isHumidityOver():               (3,2)                  True

2)isHumidityOver():              (2,50)                  False



3)isTempUnder():                  (2,1)                  True

4)isTempUnder():                  (2,10)                 False



5)isCloudHeightUnder():         (1000,2000)              True

6)isCloudHeightUnder():         (2000,1000)              False



"""

