{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"conditionals_report_demo.ipynb","provenance":[],"collapsed_sections":[]},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"markdown","metadata":{"id":"Z7zvmrKedLgT","colab_type":"text"},"source":["# Algorithms as Decision Makers\n","\n","**My Team:**\n","- Evan Peck (Prof. Baish)\n","- Kevin Wrecked (Prof. Peck)\n","- Devan Deck (Prof. Peck)\n","\n","*The following is a truncated example of what a report might look like for your team*"]},{"cell_type":"markdown","metadata":{"id":"xcLWlFGNdwns","colab_type":"text"},"source":["## Assessing the Needs of Our Users\n","\n","We interviewed 7 students about their personal factors\n","\n","### Factors that matter\n","- Class year\n"," - Students closer to graduation should have preference\n","- Age\n"," - Older students should have preference\n","- Campus job responsibilities\n"," - Students who need to work part time should be able to choose places close to that work. \n","- Disability issues \n"," - Students with disabilities should be able to choose housing that accomodates those issues. \n","- Mental health issues"]},{"cell_type":"markdown","metadata":{"id":"2xwKpb_FhWaN","colab_type":"text"},"source":["## Our Algorithm in English\n","\n","For our algorithm, we are going to prioritize class year and age. \n","\n","- Question 1: *What year are you? (1, 2, 3, 4):* \n"," - 1: +1 pts\n"," - 2: +2 pts\n"," - 3: +3 pts\n"," - 4: +4 pts\n","- Question 2: *How old are you?*\n"," - if greater than 22, then + 1pt\n"," - if 22 or less, then no points\n"," "]},{"cell_type":"markdown","metadata":{"id":"8z3RY6vziDhW","colab_type":"text"},"source":["## Test Cases\n","\n","Below, I have 3 test cases. You should probably have more. \n","\n","- Case 1\n"," - Input: A 25 year old senior who is on academic probabation\n"," - Output: 4 points\n","\n","- Case 2\n"," - Input: 22 year old junior who is student teaching\n"," - Output: 4 points \n","\n","- Case 3\n"," - Input: 20 year old sophomore on disciplinary probation\n"," - Ouput: -1 points"]},{"cell_type":"markdown","metadata":{"id":"HskXtXm8ez4T","colab_type":"text"},"source":["## Python Code of Our Algorithm"]},{"cell_type":"code","metadata":{"id":"0H9WjBtTevTn","colab_type":"code","outputId":"b9417197-14e0-40e9-87a3-5cd69b9cbe43","executionInfo":{"status":"ok","timestamp":1579630051191,"user_tz":300,"elapsed":15662,"user":{"displayName":"Evan Peck","photoUrl":"https://lh3.googleusercontent.com/a-/AAuE7mCxqtmZwdbuOZzmvr73NOsgNgzxnNCRqz5t-P4daA=s64","userId":"04911074708321622228"}},"colab":{"base_uri":"https://localhost:8080/","height":202}},"source":["# Created by: Evan Peck (Bucknell University)\n","# - Contact: evan.peck@bucknell.edu\n","# - Last Modified: April 6, 2019\n","\n","# Keeps track of the point total during questions\n","current_score = 0\n","\n","# A header to start the program\n","print(\"-------------------------------\")\n","print(\" HOUSING SCORE CALCULATOR\")\n","print(\"-------------------------------\")\n","print()\n","\n","# Assign points based on class year\n","print(\"QUESTION 1\")\n","year_ans = input(\"What year are you? (1, 2, 3, 4): \")\n","\n","if year_ans == \"1\":\n"," current_score += 1\n","elif year_ans == \"2\":\n"," current_score += 2\n","elif year_ans == \"3\":\n"," current_score += 3\n","elif year_ans == \"4\":\n"," current_score += 4\n","\n","# If the student is >= 23 years old, give them another point\n","years_old = input(\"How old are you?: \")\n","\n","if int(years_old) >= 23:\n"," current_score += 1\n","\n","# At the end of the program, tell the user their score\n","print()\n","print(\"------YOUR HOUSING SCORE----------\")\n","print(\"Your housing points score is\", current_score)\n","print(\"----------------------------------\")"],"execution_count":1,"outputs":[{"output_type":"stream","text":["-------------------------------\n"," HOUSING SCORE CALCULATOR\n","-------------------------------\n","\n","QUESTION 1\n","What year are you? (1, 2, 3, 4): 4\n","How old are you?: 25\n","\n","------YOUR HOUSING SCORE----------\n","Your housing points score is 5\n","----------------------------------\n"],"name":"stdout"}]},{"cell_type":"markdown","metadata":{"id":"VimdCdQhmuoY","colab_type":"text"},"source":["## Team Reflection: Tradeoffs\n"," \n","While the ordering of class years makes sense, our algorithm should probably do more service to the needs of non-traditional students. For example, you could be a 31 year old sophomore... but have no more points than any junior. Of course that person should be able to live off campus!\n","\n","In the future, we would revise this to weight student age heavier. We would also rethink the point alotment to classes. 3rd years should have priority over 1st years... but should they really have 3x as much? (This is what the points suggest). "]}]}