Skip to content

Commit

Permalink
Added practice exercise 1
Browse files Browse the repository at this point in the history
  • Loading branch information
emeyers committed Jan 29, 2022
1 parent 9d5af1c commit d61c919
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 101,232 deletions.
Binary file added practice_exercises/practice01.zip
Binary file not shown.
21 changes: 10 additions & 11 deletions practice_exercises/practice01/practice01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
"source": [
"# Practice Exercises 1: Expressions\n",
"\n",
"Welcome to YData: An Introduction to Data Science! Most weeks we will post practice exercises like this one to give you additional hands-on practice. This is crucial for learning technical subjects\n",
"Welcome to YData: An Introduction to Data Science! Most weeks we will post practice exercises like this one to give you additional hands-on practice. \n",
"\n",
"Before we get started, there are some administrative details.\n",
"\n",
"Practice exercises are *not* required and will not be turned in for credit.\n",
"\n",
"Collaborating on the practice exercises is encouraged! You should rarely be stuck for more than a few minutes on questions in these exercises, so ask a neighbor or come to the instructor's, TF's, or ULA's office hours for additional 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",
"Collaborating on the practice exercises is strongly encouraged! You should rarely be stuck for more than a few minutes on questions in these exercises, so ask a neighbor or come to the instructor's, TF's, or ULA's office hours for additional 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",
"You can read more about course policies on our [canvas site](https://canvas.yale.edu) on the [course website](http://ydata123.org/).\n",
"\n",
"#### Today's exercises\n",
"\n",
Expand All @@ -25,7 +24,7 @@
"3. call *functions* to use code other people have written; and\n",
"4. break down Python code into smaller parts to understand it.\n",
"\n",
"This lab covers parts of [Chapter 3](http://www.inferentialthinking.com/chapters/03/programming-in-python.html) of the online textbook. You should read the book, but not right now. Instead, let's get started!\n",
"These practice covers parts of [Chapter 3](http://www.inferentialthinking.com/chapters/03/programming-in-python.html) of the online textbook.\n",
"\n",
"Credit: These practice exercises have been adapted from Berkeley's Data8 course."
]
Expand Down Expand Up @@ -269,7 +268,7 @@
"metadata": {},
"outputs": [],
"source": [
"1+6*5-6*3**2*2**3/4*7"
"6+6*5-6*3**2*2**3/4*7"
]
},
{
Expand All @@ -278,7 +277,7 @@
"metadata": {},
"outputs": [],
"source": [
"1+(6*5-(6*3))**2*((2**3)/4*7)"
"6+(6*5-(6*3))**2*((2**3)/4*7)"
]
},
{
Expand All @@ -287,13 +286,13 @@
"source": [
"In standard math notation, the first expression is\n",
"\n",
"$$1 + 6 \\times 5 - 6 \\times 3^2 \\times \\frac{2^3}{4} \\times 7,$$\n",
"$$6 + 6 \\times 5 - 6 \\times 3^2 \\times \\frac{2^3}{4} \\times 7,$$\n",
"\n",
"while the second expression is\n",
"\n",
"$$1 + (6 \\times 5 - (6 \\times 3))^2 \\times (\\frac{(2^3)}{4} \\times 7).$$\n",
"$$6 + (6 \\times 5 - (6 \\times 3))^2 \\times (\\frac{(2^3)}{4} \\times 7).$$\n",
"\n",
"**Question 2.1.1.** Write a Python expression in this next cell that's equal to $5 \\times (3 \\frac{10}{11}) - 50 \\frac{1}{3} + 2^{.5 \\times 22} - \\frac{7}{33} + 1$. That's five times three and ten elevenths, minus fifty and a third, plus two to the power of half 22, minus 7 33rds plus 1. By \"$3 \\frac{10}{11}$\" we mean $3+\\frac{10}{11}$, not $3 \\times \\frac{10}{11}$.\n",
"**Question 2.1.1.** Write a Python expression in this next cell that's equal to $5 \\times (3 \\frac{10}{11}) - 50 \\frac{1}{3} + 2^{.5 \\times 22} - \\frac{7}{33} + 5$. That's five times three and ten elevenths, minus fifty and a third, plus two to the power of half 22, minus 7 33rds plus 5. By \"$3 \\frac{10}{11}$\" we mean $3+\\frac{10}{11}$, not $3 \\times \\frac{10}{11}$.\n",
"\n",
"Replace the ellipses (`...`) with your expression. Try to use parentheses only when necessary.\n",
"\n",
Expand Down Expand Up @@ -835,7 +834,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -849,7 +848,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.7.10"
}
},
"nbformat": 4,
Expand Down
Binary file removed practice_exercises/practice02/array_logarithm.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed practice_exercises/practice02/excel_array.jpg
Binary file not shown.
Loading

0 comments on commit d61c919

Please sign in to comment.