# import statistics library as stat
#
import statistics as stat
#
# import matplotlib.pyplot as plt and NumPy as np
import matplotlib.pyplot as plt
import numpy as np

temps = [45, 51, 38, 42, 47, 51, 52, 55, 48, 43]
n = len(temps)
# for plotting purposes I have added an array of days from 1 to 10
days = np.linspace(1,n,n)
print ("The mean of the data is: ", stat.mean(temps))
mean = stat.mean(temps)
print ("The median of the data is: ", stat.median (temps))
median = stat.median(temps)
print ("The mode of the data is: ", stat.mode (temps))
mode = stat.mode(temps)
import math
print ("The variance of the data is: ", stat.variance(temps))
variance = stat.variance(temps)
print ("The standard deviation of the data is: ", stat.stdev(temps))
stdev = stat.stdev(temps)

# Plot the temperatures vs the days as a scatter plot using a red "x"
#
# Plot the mean as a horizontal line in green
#
# Illustrate 1 standard deviation away from the mean by drawing two horizonal lines in
# as dotted blue lines
x = np.linspace(1,1)
y = np.ones(len(x)) * mean
plt.plot(y,'g')
plt.plot(temps,days,'rx')
plt.plot(--b)
plt.show()

x = np.random.randint (100, 200, 15)
print (x)

y = np.random.uniform(size = 15)
print (y)

z = np.random.uniform(10,40,15)
print (z)

a = np.random.normal(size = 15)
print (a)

b = 20 + a * (.5)
print (b)