From a1cefb44568770e11c60b5e10a4a74a1da21f212 Mon Sep 17 00:00:00 2001 From: GitHubUserName Date: Sat, 17 Sep 2022 10:10:02 -0600 Subject: [PATCH 1/3] logical 9 17 22 --- ...ython_DataTypes_Variables-checkpoint.ipynb | 1058 +++++++++++++++++ Python_DataTypes_Variables.ipynb | 283 ++++- 2 files changed, 1283 insertions(+), 58 deletions(-) create mode 100644 .ipynb_checkpoints/Python_DataTypes_Variables-checkpoint.ipynb diff --git a/.ipynb_checkpoints/Python_DataTypes_Variables-checkpoint.ipynb b/.ipynb_checkpoints/Python_DataTypes_Variables-checkpoint.ipynb new file mode 100644 index 0000000..93c74d7 --- /dev/null +++ b/.ipynb_checkpoints/Python_DataTypes_Variables-checkpoint.ipynb @@ -0,0 +1,1058 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "d427adea", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "742b151ccaefe7ca8b19372a153d8c35", + "grade": false, + "grade_id": "cell-391ad82e26ad2d29", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "### Instructions\n", + "\n", + "* Sign up for the free course on Educative, __Learn Python 3 From Scratch__\n", + "* https://www.educative.io/courses/learn-python-3-from-scratch\n", + "* Complete the programming exercises below as you go through the course.\n", + "* Delete or comment out the line of code in each cell which says `raise NotImplementedError()` and replace it with your own." + ] + }, + { + "cell_type": "markdown", + "id": "9b741610", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "2da0df50bce4c1cf6f85a1f84f365b95", + "grade": false, + "grade_id": "cell-866864990e3a9d6e", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "# Educative - Data Types and Variables\n", + "\n", + "https://www.educative.io/courses/learn-python-3-from-scratch/BnxqV56jvjx" + ] + }, + { + "cell_type": "markdown", + "id": "8ac982fa", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "29282932878a50ed64e46ed434f331d2", + "grade": false, + "grade_id": "cell-d7d3b82940617ff2", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to create a snake case variable name and assign it the value of 10." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "52397224", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "cbf7a3bae22fbe3726306c2223ee6a4e", + "grade": true, + "grade_id": "cell-761fb81a84d7a23d", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "100000\n" + ] + } + ], + "source": [ + "\n", + "# YOUR CODE HERE\n", + "annual_income = 100000\n", + "print(annual_income)" + ] + }, + { + "cell_type": "markdown", + "id": "d98810a2", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "736a64181e554b757eb161b364a5b3c1", + "grade": false, + "grade_id": "cell-d59c6163b889f59c", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to create an integer variable." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "9d0ff161", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "9b11e598c2d9b5914696d2254b5c4aab", + "grade": true, + "grade_id": "cell-396125cff54505d8", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10\n" + ] + } + ], + "source": [ + "\n", + "# YOUR CODE HERE\n", + "print(10)" + ] + }, + { + "cell_type": "markdown", + "id": "2080d0c3", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "6d4079781229836e463778deaa8bb99e", + "grade": false, + "grade_id": "cell-b6d37869a80bd96f", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to create a floating point variable." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "6f07e58d", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "2715e70ca8eedc2fbd450ca3ffcc22ba", + "grade": true, + "grade_id": "cell-d2912c074866d9d3", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.23456789\n" + ] + } + ], + "source": [ + "# YOUR CODE HERE\n", + "flt_pt = 1.23456789\n", + "print(flt_pt)" + ] + }, + { + "cell_type": "markdown", + "id": "33fd9739", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "8bd9add54d09f99e700291edc7f25a65", + "grade": false, + "grade_id": "cell-119ea5d605f6edd8", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to create a boolean variable and assign it an appropriate value." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "7fbccad3", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "c29d30f80368f9c549d4ddf0b2ca6ad9", + "grade": true, + "grade_id": "cell-af54f2888b2c727e", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "False\n", + "False\n" + ] + } + ], + "source": [ + "# YOUR CODE HERE\n", + "print(True)\n", + "\n", + "f_bool = False\n", + "print(f_bool)\n", + "\n", + "#Sheep can fly = False\n", + "\n", + "sheep_can_fly = False\n", + "print(sheep_can_fly)" + ] + }, + { + "cell_type": "markdown", + "id": "6441ed88", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "4fba16b60362bd8836f43c75fc5ba38c", + "grade": false, + "grade_id": "cell-4ce716f45e010bf9", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to create a string variable." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "1bb7f4a7", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "f56e3e26741187c34a26f3b4bb0e70d1", + "grade": true, + "grade_id": "cell-5335282ac8e23828", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "This is MY string!\n" + ] + } + ], + "source": [ + "# YOUR CODE HERE\n", + "my_string = \"This is MY string!\"\n", + "print(my_string)" + ] + }, + { + "cell_type": "markdown", + "id": "271fbba2", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "f47f60c2519bbbc7d823fb1e9abfc092", + "grade": false, + "grade_id": "cell-81b798894dad2560", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the length of the given string variable." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "761b7a69", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "8a42c93c662715e1a87ddb21e3954a9c", + "grade": true, + "grade_id": "cell-bc1b2e67e758bc5a", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "11\n" + ] + } + ], + "source": [ + "random_string = \"I am Batman\" # 11 characters\n", + "\n", + "# YOUR CODE HERE\n", + "print(len(random_string))" + ] + }, + { + "cell_type": "markdown", + "id": "05ed514a", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "18610b4e92c9fe339f27838b076b4f6b", + "grade": false, + "grade_id": "cell-1d6e95db84984faf", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print a slice of the string which includes the first four characters." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "3a8d1311", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "0d9863f703610543f3390b3536811f9e", + "grade": true, + "grade_id": "cell-1792d01dd2bc1d02", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "This\n" + ] + } + ], + "source": [ + "my_string = \"This is MY string!\"\n", + "\n", + "# YOUR CODE HERE\n", + "print(my_string[0:4]) " + ] + }, + { + "cell_type": "markdown", + "id": "7626ddde", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "58093f80c1a1406f825b3369de4fee20", + "grade": false, + "grade_id": "cell-273a10b2eeb9bb21", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the sum of the two variables using the addition operator." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e0d690be", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "3503798d55b5c1d5b0bebb53dbc8fbac", + "grade": true, + "grade_id": "cell-f5331b4cce28e8db", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "num = 20\n", + "flt = 10.5\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "91ffdea0", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "8394a654da5322b5b8cdd0b40fc9c0d6", + "grade": false, + "grade_id": "cell-9ed29caf03aa9fc7", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the product of the two variables using the multiplication operator." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e1560b4f", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "587ca1a170c5bd2880bc727667b30a7a", + "grade": true, + "grade_id": "cell-3f3cd8490abf38ae", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "num = 20\n", + "flt = 10.5\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "fd367b13", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "5a5fc54c7da72acd26cd7b14636f963e", + "grade": false, + "grade_id": "cell-6eebe319920d444c", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the result rounded down to the nearest smaller integer by dividing one variable by the other using the floor division operator." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cccfd5b6", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "ca20418761d0fe4b7ddda801d288044a", + "grade": true, + "grade_id": "cell-b6effb3471f75209", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "num = 20\n", + "flt = 10.5\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "2730ad5b", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "2372fd8cfdbe649f53ebd380f2b728ea", + "grade": false, + "grade_id": "cell-ad12b2ab1118a768", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the remainder when dividing one variable by the other using the modulo operator." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9ba57ac6", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "cd6e1e15e35ad4b9e0db315e8f1f9a65", + "grade": true, + "grade_id": "cell-b4d1e8b1c4a837ec", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "num = 20\n", + "flt = 10.5\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "acc56b4e", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "d61535c40b94fcff26ebd39f14edf57d", + "grade": false, + "grade_id": "cell-4b8d6facc0f396ce", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the result of comparing num1 to num2 using the greater than, less than, equal to, and not equal to operators." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b9bae71f", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "54365f4ef64f871901d7531d65262db2", + "grade": true, + "grade_id": "cell-e19e82aa1c3cf0d9", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "num1 = 5\n", + "num2 = 10\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "098cb888", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "a98fe5d22046b8c7c3065a609d6c2cfe", + "grade": false, + "grade_id": "cell-6978262182c9294c", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the value for num1. \n", + "\n", + "Add 10 to num1 using the add and assign operator, and print the new value for num1." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4c838653", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "605f092f14deacc820a0a2c29fa466fc", + "grade": true, + "grade_id": "cell-6f15b764a48c59fb", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "num1 = 5\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "3e57efe8", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "ad0356b77cb43ee2bfcdc30e5248775f", + "grade": false, + "grade_id": "cell-52f2061e79a35cf8", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the result for each of the boolean expressions below which use the comparison operators `or`, `and`, and `not`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7fa9376b", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "1891bf59cdd22f85de48a5a02d6eae44", + "grade": true, + "grade_id": "cell-8b3f949c8b00c81c", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "# OR Expression\n", + "my_bool1 = True or False\n", + "\n", + "# AND Expression\n", + "my_bool2 = True and False\n", + "\n", + "# NOT expression\n", + "my_bool3 = False\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "c605d1e8", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "eee7dc82d613f6d2dd80e394b5fdd4d0", + "grade": false, + "grade_id": "cell-f688292300a740e5", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Run the code in the cell below and add end line comments on each print statement describing the results of the comparison." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4464a8f8", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "148d05b54ad5f8687971541bfd24a87e", + "grade": true, + "grade_id": "cell-a97efd78e3049120", + "locked": false, + "points": 2, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "print('a' < 'b') \n", + "\n", + "house = \"Gryffindor\"\n", + "house_copy = \"Gryffindor\"\n", + "\n", + "print(house == house_copy)\n", + "\n", + "new_house = \"Slytherin\"\n", + "\n", + "print(house == new_house)\n", + "\n", + "print(new_house <= house)\n", + "\n", + "print(new_house >= house)\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "31e0c61e", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "df5af7b70c577a22dedbfd2822cac93a", + "grade": false, + "grade_id": "cell-237f2cae3dab82f7", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to create a new variable called `full_name`. \n", + "\n", + "Concatenate the given string variables in order using the addition operator.\n", + "\n", + "Print the new variable. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "44f985df", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "7054a94ec843adcafa4f944e974ae76f", + "grade": true, + "grade_id": "cell-327314a29d357cf1", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "first_half = \"Bat\"\n", + "second_half = \"man\"\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "9322de7d", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "d9ac8957ab32b13b2deaa4c261a54507", + "grade": false, + "grade_id": "cell-215ea0f3a819d34b", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below which uses the `in` keyword to search for the word `eye` in the string below and print the result." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "201c4eac", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "bbbceba258bff97bf15808188deda4da", + "grade": true, + "grade_id": "cell-bf5323c2829cbd36", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "string1 = \"There's no i in team.\"\n", + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "14c35af0", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "852e8a2bb4b10d7df1ee5b592c449c65", + "grade": false, + "grade_id": "cell-2adf80bb6c66e619", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below which creates a list with the following items [1, 2.5, \"A string\", True] and print the list." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "da4a840a", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "754feb743fb967025838a755dffe3682", + "grade": true, + "grade_id": "cell-55e5d4419692d20b", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + }, + { + "cell_type": "markdown", + "id": "1da40a38", + "metadata": { + "deletable": false, + "editable": false, + "nbgrader": { + "cell_type": "markdown", + "checksum": "81a3d63775bc8bb0dcc3c831efddeccf", + "grade": false, + "grade_id": "cell-c59518ae4bf7629e", + "locked": true, + "schema_version": 3, + "solution": false, + "task": false + } + }, + "source": [ + "Write code in the cell below to print the length of your list." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b4adbac0", + "metadata": { + "deletable": false, + "nbgrader": { + "cell_type": "code", + "checksum": "b9c5edcfd225a444a456042a3e693633", + "grade": true, + "grade_id": "cell-d6f7000d69530aa2", + "locked": false, + "points": 1, + "schema_version": 3, + "solution": true, + "task": false + } + }, + "outputs": [], + "source": [ + "\n", + "# YOUR CODE HERE\n", + "raise NotImplementedError()" + ] + } + ], + "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", + "version": "3.9.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Python_DataTypes_Variables.ipynb b/Python_DataTypes_Variables.ipynb index 654e090..a678933 100644 --- a/Python_DataTypes_Variables.ipynb +++ b/Python_DataTypes_Variables.ipynb @@ -72,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "52397224", "metadata": { "deletable": false, @@ -88,11 +88,20 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "100000\n" + ] + } + ], "source": [ "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "annual_income = 100000\n", + "print(annual_income)" ] }, { @@ -118,7 +127,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "id": "9d0ff161", "metadata": { "deletable": false, @@ -134,11 +143,19 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10\n" + ] + } + ], "source": [ "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(10)" ] }, { @@ -164,7 +181,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "id": "6f07e58d", "metadata": { "deletable": false, @@ -180,10 +197,19 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.23456789\n" + ] + } + ], "source": [ "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "flt_pt = 1.23456789\n", + "print(flt_pt)" ] }, { @@ -209,7 +235,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "id": "7fbccad3", "metadata": { "deletable": false, @@ -225,10 +251,28 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "False\n", + "False\n" + ] + } + ], "source": [ "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(True)\n", + "\n", + "f_bool = False\n", + "print(f_bool)\n", + "\n", + "#Sheep can fly = False\n", + "\n", + "sheep_can_fly = False\n", + "print(sheep_can_fly)" ] }, { @@ -254,7 +298,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "id": "1bb7f4a7", "metadata": { "deletable": false, @@ -270,10 +314,19 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "This is MY string!\n" + ] + } + ], "source": [ "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "my_string = \"This is MY string!\"\n", + "print(my_string)" ] }, { @@ -299,7 +352,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "id": "761b7a69", "metadata": { "deletable": false, @@ -315,12 +368,20 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "11\n" + ] + } + ], "source": [ "random_string = \"I am Batman\" # 11 characters\n", "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(len(random_string))" ] }, { @@ -346,7 +407,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "id": "3a8d1311", "metadata": { "deletable": false, @@ -362,12 +423,20 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "This\n" + ] + } + ], "source": [ "my_string = \"This is MY string!\"\n", "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(my_string[0:4]) " ] }, { @@ -393,7 +462,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "id": "e0d690be", "metadata": { "deletable": false, @@ -409,13 +478,21 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "30.5\n" + ] + } + ], "source": [ "num = 20\n", "flt = 10.5\n", "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(num + flt)" ] }, { @@ -441,7 +518,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "id": "e1560b4f", "metadata": { "deletable": false, @@ -457,13 +534,21 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "210.0\n" + ] + } + ], "source": [ "num = 20\n", "flt = 10.5\n", "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(num * flt)" ] }, { @@ -489,7 +574,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "id": "cccfd5b6", "metadata": { "deletable": false, @@ -505,13 +590,23 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.0\n", + "1.0\n" + ] + } + ], "source": [ "num = 20\n", "flt = 10.5\n", "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(num // flt)\n", + "print(20 // 10.5)" ] }, { @@ -537,7 +632,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "id": "9ba57ac6", "metadata": { "deletable": false, @@ -553,15 +648,29 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "9.5\n" + ] + } + ], "source": [ "num = 20\n", "flt = 10.5\n", "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(num % flt)" ] }, + { + "cell_type": "markdown", + "id": "9fdc244e", + "metadata": {}, + "source": [] + }, { "cell_type": "markdown", "id": "acc56b4e", @@ -585,7 +694,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 27, "id": "b9bae71f", "metadata": { "deletable": false, @@ -601,13 +710,21 @@ "task": false } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n" + ] + } + ], "source": [ "num1 = 5\n", "num2 = 10\n", "\n", "# YOUR CODE HERE\n", - "raise NotImplementedError()" + "print(num1 Date: Sat, 17 Sep 2022 10:15:31 -0600 Subject: [PATCH 2/3] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bfbcff5..7d9dfac 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ## Summary of steps to complete -- [ ] Fork this repository so you have your own copy to work on. -- [ ] Clone the repository on your local machine. -- [ ] Complete the Jupyter Notebook included in this repository. -- [ ] Push your completed notebook to your GitHub repository. -- [ ] Submit a link to this GitHub repository in Canvas. +- [ x] Fork this repository so you have your own copy to work on. +- [x ] Clone the repository on your local machine. +- [ x] Complete the Jupyter Notebook included in this repository. +- [x] Push your completed notebook to your GitHub repository. +- [ x] Submit a link to this GitHub repository in Canvas. ## Fork & Clone this repository From 0d46919256c6476e6b34d2249633fbf3315a6a22 Mon Sep 17 00:00:00 2001 From: kateflynn08 <111721618+kateflynn08@users.noreply.github.com> Date: Sat, 17 Sep 2022 10:15:58 -0600 Subject: [PATCH 3/3] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7d9dfac..ab01283 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ## Summary of steps to complete -- [ x] Fork this repository so you have your own copy to work on. -- [x ] Clone the repository on your local machine. -- [ x] Complete the Jupyter Notebook included in this repository. +- [x] Fork this repository so you have your own copy to work on. +- [x] Clone the repository on your local machine. +- [x] Complete the Jupyter Notebook included in this repository. - [x] Push your completed notebook to your GitHub repository. -- [ x] Submit a link to this GitHub repository in Canvas. +- [x] Submit a link to this GitHub repository in Canvas. ## Fork & Clone this repository