From 095f5deae94618978aeda9fb228e0c9de00bcec9 Mon Sep 17 00:00:00 2001 From: Mbasha Seth <48843795+Mbashas@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:51:07 +0300 Subject: [PATCH] Day 4 --- Seth_A99501/day4.ipynb | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Seth_A99501/day4.ipynb 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 +}