Experience designing and expressing decision structures in flowcharts, Python and Excel.

What to learn: • Experience designing and expressing decision structures in flowcharts, Python and Excel. • Competence with building charts in Excel. What to make: • A properly named zip folder containing the following solutions, in file formats compatible with the computers at MRU: o A flowchart solution as a pdfs, Visio files or image files o Python code saved as a iPython notebook project o A spreadsheet as . xlsx files Problem 1 Identify any each of these creatures, using as few questions as possible: • ladybug • chicken • cow • magpie • emu • scorpion • horse • stingray • human • whale • rattlesnake • salamander • koala • gecko • penguin • flamingo Part One: Flowchart algorithm Your flowchart must ask the user questions about a creature to identify one creature the user has chosen randomly from the above list. The program will need to eventually output the intended creature. Consider researching real-life biological characteristics scientists would actually use to differentiate and categorize the creatures. You will need clear and obvious features that easily produce two clear outcomes. Identify characteristics of the resulting sub-groups that could be used to further organize them into still smaller groups. You are encouraged to consider both Boolean type conditions (e.g. endothermic TRUE or FALSE) and numerical conditions (e.g. number of legs > 2). You may use nested decisions, if..elif..else, and complex conditions (using Boolean/logical operators). Your algorithm will emphasize the decision tree (i.e. the order and form of the IF statements) and must be expressed as a flowchart. The algorithm should to be explicit, precise, unambiguous, complete, and efficient. Ideally the characteristics upon which your decision structures are based should be able to identify the creature after four (4) questions. Just asking “Is it a cow?”, “Is it a horse?” “Is it an aphid?” etc. until you hit the right one, is not an efficient nor acceptable solution. Bonus: Include in your algorithm a ‘count’ of the number of questions asked and display that after the creature is identified. Part Two: Python Create a Python solution to Problem 1, a program in a single cell based on your flowchart, that uses a series of selection/decision structures, to get the program to ‘guess’ the user’s choice of creature. Input prompts and output must be in ‘complete sentences’. Bonus: Include in your Python program a ‘count’ of the number of questions asked and clearly display that information after the creature is identified. Part Three: Excel Data Analysis Problem 2: Is Calgary experiencing climate change? The historical monthly climate and weather data report for Calgary from January 2000 – December 2011 has been downloaded from www.climate.weather.gc.ca website and a version is available to you as rawData.xlsx Study the data. Rename the file appropriately, organize, add functions and format the sheet as instructed below. Do not perform any calculations manually. Always get Excel to do the work. • Display the months’ numbers as actual month names (nested if statements will work but using a lookup function is more efficient.) • Display the overall averages for the all temperatures, AND for the various precipitations categories. • Display the overall maximum and minimum values for all temperatures and precipitation categories. • Count and display, for each category, the number of months that fall above the respective category’s overall mean. • Indicate which months are: o dry months when the total precipitation falls below 20 mm. o wet months when the total precipitation falls 100 mm or more. o hot months when the maximum temperature is above 30oC o cold months when the minimum temperature is below or equal to 4oC o ‘dry’ and ‘cold’ months. o ‘wet’ or ‘cold’ months o ‘dry’ months where the mean temperature is above 20oC and below 30oC • On its own separate sheet, a scatter plot that shows: o The mean monthly temperature vs time. o Includes a meaningful title, above the chart and labels all axes. o Starts the vertical axis at zero. Format the x axis to be simplified but meaningful. o Plot a moving average trend line. o Extrapolate the data series forward linearly by 60 months. o Include a legend. • On yet another separate sheet, a short (one paragraph) discussion, referring to your results answering Problem 2: Is Calgary’s climate changing? Format and name all sheet(s) clearly and sheet contents clearly and legibly. Grading Sheet Part 1: Flowchart • correct flowchart symbols used /3 • flowchart organized and explicit arrows /3 • reads input correctly /3 • correct decisions structures and conditions /3 • writes output correctly /3 Bonus: count kept and displayed /2 Total /15 Part 2: Python Program • self-documenting code used /3 • inputs from user happens and is ‘clear’ /3 • decision structures have correct o specific conditions /3 o overall structure /3 o efficiency /3 • output exists and is clear /3 Bonus: count kept and displayed /2 Total /18 Part 3: Excel Data Analysis • Months converted from number to names /3 • Determines and displays: o overall mean, maximum and minimum calculations /3 o number of months above each category’s averages. /3 o months which are: ? below 20 mm total precipitation /1 ? 100 mm or more total precipitation. /1 ? above 30oC maximum temperature /1 ? equal to or below 4oC minimum temperature /2 ? both dry and cold months /2 ? either wet or cold months /2 ? dry months, average temp is > 20oC and < 30oC /3 Spreadsheet Subtotal /21 Chart 1 • On own named sheet /2 • Correct chart type, and data sources /2 • Titles and appearance /2 • Axes formatted /2 • Trend lines included /2 • Legend included /2 Chart Subtotal /12 Discussion /3 Excel Total /36 Grand Total /69