Skip to content

Commit

Permalink
solution in a different cell
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorhuang1 committed Mar 12, 2024
1 parent 7e7c4b2 commit 09bbd63
Showing 1 changed file with 61 additions and 53 deletions.
114 changes: 61 additions & 53 deletions _notebooks/2024-03-12-CSP-MCQ-2020-missed.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"layout: post\n",
"title: MCQ 2020 Frequently Missed Questions\n",
"description: Questions and sample Python code to represent the most frequently missed questions on the 2020 AP Computer Science A Multiple Choice Exam. \n",
"type: collab\n",
"courses: { csp: {week: 26} }\n",
"type: hacks\n",
"courses: { compsci: {week: 26} }\n",
"---"
]
},
Expand Down Expand Up @@ -264,7 +264,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 1,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -314,54 +314,6 @@
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"binary: 01000000 11000000 11110000\n",
"decimal 64 192 240\n",
"proportion 0.25098039215686274 0.7529411764705882 0.9411764705882353\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAH4AAAB7CAYAAACy7jQ7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAABZklEQVR4nO3XwUlEQRBF0S4xAEOa0CckMygj+H8ljnrP2b5Nw4WCnt099Ly9+gG8hvBRwkcJHyV8lPBR73fjzPjr/WG7O1fbbfhzznk8P7/1MfyM5+Pjdnfqo4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPmt29HmeuR3693Z2r7TY8/5dTHyV8lPBRwkcJHyV81BdVyxTva9TbKgAAAABJRU5ErkJggg==",
"text/plain": [
"<Figure size 144x144 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"binary: 11111111 00000000 11111111\n",
"decimal 255 0 255\n",
"proportion 1.0 0.0 1.0\n",
"binary: 00000000 00000000 00000000\n",
"decimal 0 0 0\n",
"proportion 0.0 0.0 0.0\n",
"binary: 11111111 11111111 11111111\n",
"decimal 255 255 255\n",
"proportion 1.0 1.0 1.0\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAB7CAYAAADXClMoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAB/0lEQVR4nO3aQWrEMBAAQU3Y/3958gPnYtomW3W1EYJBfRCa3T0ANH6e3gDANxFdgJDoAoREFyAkugAh0QUIfa4+zoz3ZC+xu3PXWub6HnfO9RyzfYuruV5G95xz9pjh0+bcei7557y9f9bM9Xl1vQAQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2A0OevH+ZMsQ/gJjPO7JvN7j69B4Cv4XoBICS6ACHRBQiJLkBIdAFCogsQ+gWUCBf641OwrAAAAABJRU5ErkJggg==",
"text/plain": [
"<Figure size 432x144 with 3 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
Expand Down Expand Up @@ -416,8 +368,64 @@
"rgb_primary = [('11111111', '00000000', '00000000'), \n",
" ('11111111', '11111111', '00000000'),\n",
" ('00000000', '00000000', '11111111')]\n",
"plot_colors(rgb_primary)\n",
"\n",
"plot_colors(rgb_primary)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"binary: 01000000 11000000 11110000\n",
"decimal 64 192 240\n",
"proportion 0.25098039215686274 0.7529411764705882 0.9411764705882353\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAH4AAAB7CAYAAACy7jQ7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAABZklEQVR4nO3XwUlEQRBF0S4xAEOa0CckMygj+H8ljnrP2b5Nw4WCnt099Ly9+gG8hvBRwkcJHyV8lPBR73fjzPjr/WG7O1fbbfhzznk8P7/1MfyM5+Pjdnfqo4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPEj5K+Cjho4SPmt29HmeuR3693Z2r7TY8/5dTHyV8lPBRwkcJHyV81BdVyxTva9TbKgAAAABJRU5ErkJggg==",
"text/plain": [
"<Figure size 144x144 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"binary: 11111111 00000000 11111111\n",
"decimal 255 0 255\n",
"proportion 1.0 0.0 1.0\n",
"binary: 00000000 00000000 00000000\n",
"decimal 0 0 0\n",
"proportion 0.0 0.0 0.0\n",
"binary: 11111111 11111111 11111111\n",
"decimal 255 255 255\n",
"proportion 1.0 1.0 1.0\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAB7CAYAAADXClMoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAB/0lEQVR4nO3aQWrEMBAAQU3Y/3958gPnYtomW3W1EYJBfRCa3T0ANH6e3gDANxFdgJDoAoREFyAkugAh0QUIfa4+zoz3ZC+xu3PXWub6HnfO9RyzfYuruV5G95xz9pjh0+bcei7557y9f9bM9Xl1vQAQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2A0OevH+ZMsQ/gJjPO7JvN7j69B4Cv4XoBICS6ACHRBQiJLkBIdAFCogsQ+gWUCBf641OwrAAAAABJRU5ErkJggg==",
"text/plain": [
"<Figure size 432x144 with 3 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"favorite = [('01000000', '11000000', '11110000')] # Favorite Color\n",
"plot_colors(favorite)\n",
"\n",
Expand Down

0 comments on commit 09bbd63

Please sign in to comment.