Milestone 0:
Team Charter


Milestone 1:
List of Criteria

Need Statement

Preliminary List of Ideas

Milestone 2:
Individual Concept Sketches & Design Flowcharts






Group Screening Process to choose the overall best design idea based on the criteria listed above



Milestone 3:
Computing Prototype Parts List

Test Plan
The test plan, preliminary python file and its associated text file



Milestone 4A:
Preliminary Design Review Feedback

Milestone 4B:
This code has an associated text file to work
#Negar Goodarzynejad
#400257706
#Jan 28th, 2020
#MiniMilestone4B
def read_file(filename):
sensor_data = []
with open(filename) as data:
for line in data:
line = float(line.rstrip())
sensor_data.append(line)
return(sensor_data)
def average_value(data, n):
if n<= len(data)and n>0:
items= data[-n:]
values=[]
for item in items:
values.append(item)
Average= sum (values)/ n
return(Average)
else:
if n>len(data):
return(None)
def total_above(data,threshold2):
vals= []
for item in data:
if threshold2<item:
vals.append(item)
Length= len(vals)
return(Length)
def rate_change(data, n):
if n <= len(data) and n>0:
slope= (data[-1]-data[-n])/n
return(slope)
def main():
try:
textfile='TemperatureData1.txt'
num= int(input("Please input the number of data points to be considered in the average calculation."))
threshold= int(input("Please input your desired threshold value:"))
number= int(input("Please eneter the number of items to be considered for slope calculation:"))
data_list= read_file(textfile)
temp_values=[]
for item in data_list:
temp_values.append(item)
average= average_value(temp_values, num)
choice1=total_above(temp_values,threshold)
choice2= rate_change(temp_values, number)
print("The list contains the values as follows:", data_list,'\t',"the average is:", round(average,2),'\t', "The threshold is passed by this many times:",round(choice1,2), '\t', "finally, the slope is:" ,round(choice2,2))
except IOError:
print("File cannot be identified. Retry")
except ZeroDivisionError:
print("This value cannot be equal to zero.")
except ValueError:
print("Please do not input numbers in their alphabetical form, should be numerical.")
except TypeError:
print("Make sure that the number of items for slope and average calculation are positive values and excluding zero.")
main()