diff --git a/Seth_A99501/day4.ipynb b/Seth_A99501/day4.ipynb new file mode 100644 index 00000000..b448369c --- /dev/null +++ b/Seth_A99501/day4.ipynb @@ -0,0 +1,55 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Alice got an average of 87.66666666666667\n" + ] + } + ], + "source": [ + "def StudentInfo(): #define the function\n", + " #declaring student's variable\n", + " name='Alice'\n", + " grades=[85,90,88]\n", + " #calculate the avareage\n", + " average=sum(grades)/len(grades)\n", + " #Print studentt's name and average\n", + " print(f\"{name} got an average of {average}\")\n", + "\n", + "#calling the function\n", + "StudentInfo()\n", + " \n", + " " + ] + } + ], + "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 +}