diff --git a/Seth_A99501/day5.ipynb b/Seth_A99501/day5.ipynb new file mode 100644 index 00000000..66d3ae16 --- /dev/null +++ b/Seth_A99501/day5.ipynb @@ -0,0 +1,95 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the following variables and print them and their types:\n", + "An integer named my_int\n", + "my_int= 23\n", + "A float named my_float\n", + "my_float= 58.6\n", + "A string named my_string\n", + "my_string=\"Independence\"\n", + "A list named my_list\n", + "my_list=[62,23,10,\"test\"]\n", + "A tuple named my_tuple\n", + "my_tuple=(10,6)\n", + "A dictionary named my_dict\n", + "my_dict={'Day':'Friday', 'Energy level': 2.3}\n", + "Check the type of each variable to make sure it matches what you expect.\n", + "print(f'{my_int} is of data type{type(my_int)} ')" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "23 is of data type \n", + "\n", + "58.6 is of data type\n", + "\n", + "Independence is of data type\n", + "\n", + "[62, 23, 10, 'test'] is of data type\n", + "\n", + "[62, 23, 10, 'test'] is of data type\n", + "\n", + "(10, 6) is of data type\n", + "\n", + "{'Day': 'Friday', 'Energy level': 2.3} is of data type\n" + ] + } + ], + "source": [ + "#declaration of our variables\n", + "my_int= 23\n", + "\n", + "my_float= 58.6\n", + "\n", + "my_string=\"Independence\"\n", + "\n", + "my_list=[62,23,10,\"test\"]\n", + "\n", + "my_tuple=(10,6)\n", + "\n", + "my_dict={'Day':'Friday', 'Energy level': 2.3}\n", + "#print data types of our variables\n", + "print(f'{my_int} is of data type{type(my_int)} \\n')\n", + "print(f'{my_float} is of data type{type(my_float)}\\n')\n", + "print(f'{my_string} is of data type{type(my_string)}\\n')\n", + "print(f'{my_list} is of data type{type(my_list)}\\n')\n", + "print(f'{my_list} is of data type{type(my_list)}\\n')\n", + "print(f'{my_tuple} is of data type{type(my_tuple)}\\n')\n", + "print(f'{my_dict} is of data type{type(my_dict)}')" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "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.11.6" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +}