Question {
"cells":[
{
"cell_type": "markdown",
"metadata":{},
"source": [
"# Make up (Exam 1)\n",
"\n",
"To help reinforce skills from part 1 that are used throughout the rest of the semester...
\n",
"This is not extra credit. It is a chance to practice, learn, and show your new skills to gain
back some points on Exam 1; or just to get stronger with the initial materials.\n",
"\n",
"[Additional resources] (#Additional-resources-and-practice) links located at the end.\n",
"\n",
"## Part one\n",
"\n",
"Exam explained in your own words (up to 40% back on your exam score, 5% for each
problem). \n",
"**Note:** you may want to start with later practice (Part 4). The practice problems are
more isolated skills where as the exam brings them together. \n",
"\n",
"1. Complete the exam answers that you would like to give another attempt. \n",
"2. For code answers - add comments (#) to each line and explain: \n",
"
0. What is that line functionally doing? \n",
"
1. Why you choose to add that line to the code? \n",
"
2. What part of the question let you know you needed that line? \n",
"
3. What was confusing about that line?\n",
"3. For text answers - Discuss:\n",
"I
1. Which elements in the class have been the hardest to grasp?\n",
"I
2. Which parts of the exam were the hardest to understand and implement?\n",
"\n",
"## Part two\n",
"\n",
"Complete up to 4 of these code games and share your proof of completion (up to 20%
back on your exam score, 5% for each)\n",
"\n",
11*
11*
11*
11*
11*
11*
11*
11*
11*
11*
11⭑
https://www.codingame.com/training/easy/the-descent\n",
https://www.codingame.com/training/easy/temperatures\n",
https://www.codingame.com/training/easy/defibrillators\n",
https://www.codingame.com/training/easy/rock-paper-scissors-lizard-spock\n",
https://www.codingame.com/training/easy/rectangle-partition\n",
https://www.codingame.com/training/easy/shoot-enemy-aircraft\n",
https://www.codingame.com/training/easy/folding-paper\n",
https://www.codingame.com/training/easy/reverse-minesweeper\n",
https://www.codingame.com/training/easy/sudoku-validator\n",
https://www.codingame.com/training/easy/lumen\n",
https://www.codingame.com/training/easy/snail-run\n", 11*
https://www.codingame.com/training/easy/mars-lander-episode-1\n",
"\n",
"## Part three\n",
"\n",
"Complete mini projects (up to 10% back on your exam score, 5% for each section)\n",
"\n",
"* Return to homework two, update your code to account for the other rules and safety
nets in the course. Include comments for why each line is there, and what it is doing. \n",
Make a personal budget\n",
11*
"
"
*
Create a list of dictionaries for incomes and one for costs\n",
* Each dictionary should have a key-value pair for income/cost: name, dollar value,
and how many weeks between charges\n",
"
*
* Write an algorithm to accept a given number of weeks, an initial personal savings or
debt, calculate the resulting savings/debt in those number of weeks\n",
"\n",
"## Part four\n",
"\n",
"Complete the additional practice problems in this document (up to 20% back on your
exam score, 5% for each section)\n",
"\n",
11*
11*
11*
11*
[Math operations](#Math-operations)\n",
[Data types](#Data-types)\n",
[Conditionals](#Conditionals)\n",
[Loops](#Loops)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Math operations\n",
"\n",
"1. Write a lambda function for $f(x) = x^5 + 4x^{-2} + 2x^{1/2}$\n",
"2. Write a lambda function for $y(x) = 3x^{20} + (x+2)^2$\n",
"3. Write a lambda function for $g(x) = f(x) + y(x)$\n",
"4. Find the value of g when x is 15 and when x is -10\n",
"5. Discuss how you solved this problem, what each line of code is doing, and why you
selected this method to solve it. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata":{},
"outputs": [],
"source": []
},
{ "cell_type": "markdown",
"metadata":{},
"source": [
"### Data types\n",
"\n",
"1. Create a list of 20 numbers (you pick the numbers at random)\n",
"2. Sort the list acceding and defending\n",
"3. Slice the list to get the middle 10 numbers\n",
"4. Square every element of the original list\n",
"5. Discuss how you solved this problem, what each line of code is doing, and why you
selected this method to solve it. '
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata":{},
"outputs": [],
"
"source": []
},
{
"cell_type": "markdown",
"metadata":{},
"source": [
"### Conditionals\n",
"\n",
"1. Create an array of 20 people's birthdays within the range of typical undergraduate
collage students (you pick the numbers at random) \n",
"2. Determine which students are of legal drinking age in Virginia (>=21)\n",
"3. Calculate how many years each student has until they can drink and identify those
within 1 year\n",
"4. If at least 50% of the students can drink, invite everyone to a party\n",
"5. Discuss how you solved this problem, what each line of code is doing, and why you
selected this method to solve it. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata":{},
"source": [
"### Loops\n", "\n",
"1. Iteratively calculate $x_{n+1} = \\frac{x_n}{2^{x_n}}$ where $x_0 = 1$ until $|x_n -
x_{n-1}| < 0.001$. \n",
"2. Calculate $y(m) = \\sum_{n=1}^m \\frac{n}{2^n}$ where $y_0 = 0$ until $|y(m) - y(m-1)|
< 0.001$ and retain all partial sums. \n",
"3. Write code to calculate the first 10 terms of $z = \\sum_{n=1}^{30} \\frac{n^2}{2^{4n}}$
where $z_0=0$ as partial sums.\n",
"4. Plot lists from #1 and #2. You can skip axis labels and title.\n",
"5. Discuss how you solved this problem, what each line of code is doing, and why you
selected this method to solve it. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata":{},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata":{},
"source": [
"## Additional resources and practice\n",
"\n",
"Resources:\n",
"\n",
11*
11*
[Campus Learning Center](https://clc.vcu.edu/) (aka. tutoring)\n",
© Articles on ways to study/learn programming for the first time\n",
https://www.linkedin.com/pulse/overcoming-challenges-common-hurdles-faced-when-learnin
g-code\n",
"I
*
https://dev.to/yisakt/overcoming-hurdles-and-challenges-in-learning-programming-45nf\n",
"
*
https://www.codecademy.com/resources/blog/common-obstacles-of-those-struggling-to-learn
-code/\n",
"I
*
https://medium.com/@rivo.agency2010/tips-and-tricks-for-overcoming-common-challenges-i
n-learning-to-code-5fd4612e467a\n",
https://www.codecademy.com/resources/blog/common-obstacles-of-those-struggling-to-learn
-code/\n",
"
* https://zellwk.com/blog/7-challenges-of-learning-code/\n",
"* Articles on overcoming programmers block\n",
"
*
https://www.skillreactor.io/blog/the-psychology-of-coding-overcoming-mental-blocks-and-stay
ing-motivated/\n", "
*
https://qualitycoding.org/mental-block/\n",
"
*
https://www.freecodecamp.org/news/how-to-beat-coders-block-and-stay-productive/\n",
"
*
* https://simpleprogrammer.com/overcoming-programmers-block/\n",
https://medium.com/@JessiJuarez/5-tips-for-overcoming-coders-block-b334fd355f27\n",
"
*
https://www.linkedin.com/pulse/strategies-overcoming-challenges-completing-your-coding-m
agyar/\n",
"\n",
"\n",
"More practice sources for Part of of the course:\n",
"\n",
11*
© Chapters 1, 2, 4, 5:
https://pythonnumericalmethods.berkeley.edu/notebooks/Index.html\n",
https://www.codesdope.com/practice/python-decide-ifelse/\n",
11*
11*
11*
11*
11*
11*
https://www.geeksforgeeks.org/python-if-else/\n",
https://pynative.com/python-if-else-and-for-loop-exercise-with-solutions/\n",
https://teclado.com/30-days-of-python/python-30-day-8-while-loops/\n",
https://www.shiksha.com/online-courses/articles/for-loop-in-python-examples/\n",
https://www.w3resource.com/python-exercises/python-conditional-statements-and-loop-exer
cises.php\n",
11*
11*
https://holypython.com/beginner-python-exercises/\n",
https://holypython.com/intermediate-python-exercises/\n",
]
}
11*
11*
11*
11*
https://csiplearninghub.com/python-fundamentals-practice-questions/\n",
https://csiplearninghub.com/python-if-else-conditional-statement-practice/\n",
https://csiplearninghub.com/practice-questions-of-loops-in-python/\n",
https://csiplearninghub.com/important-practice-questions-of-list-in-python/"
],
"metadata":{
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
},
"language": "python",
"name": "python3"
"language_info": {
"codemirror_mode": {
},
"name": "ipython",
"version": 3
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",