{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# First Day Assignment\n", "\n", "Welcome to Math 1401! Each week you will complete an assignment like this one. You can't learn technical subjects without hands-on practice, so these assignments are an important part of the course.\n", "\n", "Here we will introduce how to turn in assignments.\n", "\n", "Collaborating on assingments is more than okay -- it's encouraged! You should rarely remain stuck for more than a few minutes on questions, so ask a neighbor or an instructor for help. (Explaining things is beneficial, too -- the best way to solidify your knowledge of a subject is to explain it.) Please don't just share answers, though.\n", "\n", "#### Today's Worksheet\n", "\n", "In today's worksheet, you'll learn how to:\n", "\n", "1. save and download jupyter files;\n", "2. turn in these files to D2L;\n", "3. compile code blocks; and\n", "4. assign variables.\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 1. Jupyter notebooks\n", "This webpage is called a Jupyter notebook. A notebook is a place to write programs and view their results, and also to write text.\n", "Text cells (like this one) can be edited by double-clicking on them. They're written in a simple format called [Markdown](http://daringfireball.net/projects/markdown/syntax) to add formatting and section headings. You don't need to learn Markdown, but you might want to.\n", "\n", "After you edit a text cell, click the \"run cell\" button at the top that looks like ▶| or hold down `shift` + `return` to confirm any changes. (Try not to delete the instructions of the lab.)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Cells\n", "Some cells contain code in the Python 3 language. Other cells contain code written in markup. We will learn the difference in Lab 1. For now answer the following questions.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 1.** What is your name?\n", "\n", "Respond to this, by replacing the ellipses (...) inside the quotation marks below with your name." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "########\n", "## Replace the ellipses (...), with your name.\n", "########\n", "\n", "name = \"...\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " Change the cell below by setting the variable year to 1,2,3, or 4 so as to complete the following question. Then hold down `shift` + `return`.\n", "\n", "**Question 2.** I am a ----- this year.\n", " 1. freshman\n", " 2. sophmore\n", " 3. junior\n", " 4. senior\n", " 5. dual enrollment student\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n", "############\n", "# Change the variable year that is listed below!\n", "############\n", "year = ...\n", "\n", "\n", "############\n", "# Do not alter the code below. It can break!\n", "############\n", "year1=['freshman','sophmore','junior','senior','dual enrollment student']\n", "if -1< year <5:\n", " print('This year is my', year1[year-1],'year!')\n", "elif year == 5:\n", " print('I am a dual enrollment student!')\n", "else:\n", " print('I am not sure.....')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's try another question. Change the cell below by filling in the string. Then hold down `shift` + `return`.\n", "\n", "**Question 3.** What is your major?\n", "\n", "Respond by replacing the ellipses below with your major." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "############\n", "# fill in the string below with your major\n", "############\n", "major = \"...\"\n", "\n", "############\n", "# Do not alter the code below. \n", "############\n", "print('My major is',major,'!')\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Let's finish up the questions with the next two.\n", "\n", "**Question 4.** Rate how extroverted you are on a scale between 0-10, where ten is extremely extroverted while zero is completely introverted." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "############\n", "# Type a number below\n", "############\n", "extraversion_factor = ...\n", "\n", "############\n", "# Do not alter the code below. \n", "############\n", "def extraversion(extraversion_factor):\n", " if -1< extraversion_factor <2:\n", " return('I consider myself introverted!')\n", " \n", " elif 2<= extraversion_factor <5:\n", " return('I consider myself somewhat introverted!')\n", " \n", " elif 5<= extraversion_factor <8:\n", " return('I consider myself somewhat extroverted!')\n", " \n", " elif 8<= extraversion_factor <11:\n", " return('I consider myself extroverted!')\n", " else:\n", " return('I am not sure how extroverted I am.')\n", "\n", "extraversion(extraversion_factor)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 5.** On average how many people do you text a week?\n", "\n", " 1. between 0 and 5 people\n", " 2. between 6 and 10 people\n", " 3. between 10 and 20 people\n", " 4. more than 20 people" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "############\n", "# Change the variable textees that is listed below!\n", "############\n", "textees = ...\n", "\n", "\n", "############\n", "# Do not alter the code below. It can break!\n", "############\n", "if 0