Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 02_activities/assignments/assignment_1.ipynb

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assignment_1.ipynb file changes should not be in assignment-2 branch.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"🚨 **Please review our [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md)** 🚨 for detailed instructions on how to format, branch, and submit your work. Following these guidelines is crucial for your submissions to be evaluated correctly.\n",
"\n",
"### Submission Parameters:\n",
"* Submission Due Date: `11:59 PM - Dec 1, 2024`\n",
"* Submission Due Date: `11:59 PM - Dec 2, 2024`\n",
"* The branch name for your repo should be: `assignment-1`\n",
"* What to submit for this assignment:\n",
" * This Jupyter Notebook (assignment_1.ipynb) should be populated and should be the only change in your pull request.\n",
Expand Down
823 changes: 491 additions & 332 deletions 02_activities/assignments/assignment_2.ipynb

Large diffs are not rendered by default.

241 changes: 240 additions & 1 deletion 02_activities/homework/01_data_types.ipynb
Original file line number Diff line number Diff line change
@@ -1 +1,240 @@
{"cells":[{"cell_type":"markdown","metadata":{"id":"jNAI57ELh-I8"},"source":["# Getting Started: Python Fundamentals\n","## Practice Problems"]},{"cell_type":"markdown","metadata":{"id":"5xeRB_0jiT5n"},"source":["### 1. What types are involved in the following expressions? What data type will each expression evaluate to?\n","\n","`8 * 2.5`"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":158,"status":"ok","timestamp":1667929890889,"user":{"displayName":"Kaylie Lau","userId":"01284785813595846851"},"user_tz":300},"id":"C6c48sSBOUeE","outputId":"3628ffce-faf6-4d23-daff-5e09edf76541"},"outputs":[],"source":["# Your code here"]},{"cell_type":"markdown","metadata":{"id":"4eICUfHi_Z-K"},"source":["`9 / 2`"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":43,"status":"ok","timestamp":1667929891449,"user":{"displayName":"Kaylie Lau","userId":"01284785813595846851"},"user_tz":300},"id":"QVdbNoA2OiQ_","outputId":"ab9f4fac-b1cc-4afc-cc54-10592b92abb1"},"outputs":[],"source":["# Your code here"]},{"cell_type":"markdown","metadata":{"id":"DhrJoWbj_cNe"},"source":["`9 // -2`"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":39,"status":"ok","timestamp":1667929891450,"user":{"displayName":"Kaylie Lau","userId":"01284785813595846851"},"user_tz":300},"id":"cSsGq3r0Opx6","outputId":"13df11ef-d136-4a42-884e-be1e369aae52"},"outputs":[],"source":["# Your code here"]},{"cell_type":"markdown","metadata":{"id":"lW4UnVfw_eYy"},"source":["`1.5 * 2 >= 7 - 3`"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":34,"status":"ok","timestamp":1667929891452,"user":{"displayName":"Kaylie Lau","userId":"01284785813595846851"},"user_tz":300},"id":"54N6gcNPOylS","outputId":"938208fc-c4c3-4e58-dd18-b50d3acc84d8"},"outputs":[],"source":["# Your code here"]},{"cell_type":"markdown","metadata":{"id":"5T-ytiTw-KvJ"},"source":["### 2. In which order will the expressions be evaluated.\n","\n","`6 * 3 + 7 * 4`\n","\n","\n","<details>\n"," <summary>Answer</summary>\n","\n"," `*` > `*` > `+` \n","</details>\n","\n","\n","`5 - 2 * 3 ** 4`\n","\n","<details>\n"," <summary>Answer</summary>\n","\n"," `**` > `*` > `-`\n","</details>\n","\n","`(5 - 2) * 3 ** 4`\n","\n","<details>\n"," <summary>Answer</summary>\n","\n"," `(-)` > `**` > `*` \n","</details>\n","\n","`5 + 2 >= 3 * 4`\n","\n","<details>\n"," <summary>Answer</summary>\n","\n"," `*` > `+` > `>=`\n","</details>"]}],"metadata":{"colab":{"authorship_tag":"ABX9TyMhUBNX+UP2C+YDtVSxQKBK","collapsed_sections":[],"provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"}},"nbformat":4,"nbformat_minor":0}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "jNAI57ELh-I8"
},
"source": [
"# Getting Started: Python Fundamentals\n",
"## Practice Problems"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "5xeRB_0jiT5n"
},
"source": [
"### 1. What types are involved in the following expressions? What data type will each expression evaluate to?\n",
"\n",
"`8 * 2.5`"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"executionInfo": {
"elapsed": 158,
"status": "ok",
"timestamp": 1667929890889,
"user": {
"displayName": "Kaylie Lau",
"userId": "01284785813595846851"
},
"user_tz": 300
},
"id": "C6c48sSBOUeE",
"outputId": "3628ffce-faf6-4d23-daff-5e09edf76541"
},
"outputs": [],
"source": [
"# 8 is an integer\n",
"# 2.5 is float\n",
"# float\n",
"# 20.0"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "4eICUfHi_Z-K"
},
"source": [
"`9 / 2`"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"executionInfo": {
"elapsed": 43,
"status": "ok",
"timestamp": 1667929891449,
"user": {
"displayName": "Kaylie Lau",
"userId": "01284785813595846851"
},
"user_tz": 300
},
"id": "QVdbNoA2OiQ_",
"outputId": "ab9f4fac-b1cc-4afc-cc54-10592b92abb1"
},
"outputs": [],
"source": [
"# 9 is an integer\n",
"# 2 is an integer\n",
"# / is the division and gives results as float data type\n",
"# 4.5"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "DhrJoWbj_cNe"
},
"source": [
"`9 // -2`"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"executionInfo": {
"elapsed": 39,
"status": "ok",
"timestamp": 1667929891450,
"user": {
"displayName": "Kaylie Lau",
"userId": "01284785813595846851"
},
"user_tz": 300
},
"id": "cSsGq3r0Opx6",
"outputId": "13df11ef-d136-4a42-884e-be1e369aae52"
},
"outputs": [],
"source": [
"# 9 is an integer\n",
"# // is the floor division\n",
"# -2 is an integer\n",
"# the result will be an integer rounded down\n",
"# -5"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "lW4UnVfw_eYy"
},
"source": [
"`1.5 * 2 >= 7 - 3`"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"executionInfo": {
"elapsed": 34,
"status": "ok",
"timestamp": 1667929891452,
"user": {
"displayName": "Kaylie Lau",
"userId": "01284785813595846851"
},
"user_tz": 300
},
"id": "54N6gcNPOylS",
"outputId": "938208fc-c4c3-4e58-dd18-b50d3acc84d8"
},
"outputs": [],
"source": [
"# 1.5 is float\n",
"# * is multiplication\n",
"# 2, 7, 3 are integers\n",
"# >= is greater than equal to\n",
"# - substraction\n",
"# result will be Boolean (FALSE)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "5T-ytiTw-KvJ"
},
"source": [
"### 2. In which order will the expressions be evaluated.\n",
"\n",
"`6 * 3 + 7 * 4`\n",
"\n",
"\n",
"<details>\n",
" <summary>Answer</summary>\n",
"\n",
" `*` > `*` > `+` \n",
"</details>\n",
"\n",
"\n",
"`5 - 2 * 3 ** 4`\n",
"\n",
"<details>\n",
" <summary>Answer</summary>\n",
"\n",
" `**` > `*` > `-`\n",
"</details>\n",
"\n",
"`(5 - 2) * 3 ** 4`\n",
"\n",
"<details>\n",
" <summary>Answer</summary>\n",
"\n",
" `(-)` > `**` > `*` \n",
"</details>\n",
"\n",
"`5 + 2 >= 3 * 4`\n",
"\n",
"<details>\n",
" <summary>Answer</summary>\n",
"\n",
" `*` > `+` > `>=`\n",
"</details>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 6 * 3, 7 * 4, 18 + 28 \n",
"# = 46\n",
"# 3 ** 4 (81), 2 * 81 (162), 5 - 162 \n",
"# = -157\n",
"# (5-2), 3 ** 4, 3 * 81 \n",
"# = 243\n",
"# 3 * 4, 5 + 2 \n",
"# FALSE"
]
}
],
"metadata": {
"colab": {
"authorship_tag": "ABX9TyMhUBNX+UP2C+YDtVSxQKBK",
"collapsed_sections": [],
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
2 changes: 1 addition & 1 deletion 05_src/data/assignment_2_data/small_01.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0,0,1
0,1,2
0,0,0
Loading
Loading