From 17e198abec4a96cf5a19e70f76bb4fb90545d514 Mon Sep 17 00:00:00 2001 From: ArtemPlugnokov <167459091+ArtemPlugnokov@users.noreply.github.com> Date: Wed, 4 Nov 2026 16:16:36 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=BD=D0=BE=D1=82=20hel?= =?UTF-8?q?lo.ipynb,=20.gitignore=20=D0=B8=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++ README.md | 3 ++ hello.ipynb | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 hello.ipynb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24eec9c --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.ipynb_checkpoints/ +_pycache_/ +*.pyc +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..a849416 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# ds-labs +Лабораторная работа по основам Git. +Блокноты с выполнененными заданиями расположены в этом каталоге. diff --git a/hello.ipynb b/hello.ipynb new file mode 100644 index 0000000..273c438 --- /dev/null +++ b/hello.ipynb @@ -0,0 +1,92 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "id": "vpCgcTgTjL3H" + }, + "outputs": [], + "source": [ + "# Лабораторная работа 1: Введение в Python и Git\n", + "#Автор: Плужников Артём, Егор Петухов, группа ИНБс-4301" + ] + }, + { + "cell_type": "code", + "source": [ + "def greet(name: str) -> str:\n", + " \"\"\"Возвращает приветствие для указанного имени.\"\"\"\n", + " return f\"Привет, {name}!\"\n", + "\n", + "def compute_statistics(numbers):\n", + " \"\"\"Считает базовые статистики по списку чисел.\"\"\"\n", + " if not numbers:\n", + " return None\n", + " return {\n", + " \"count\": len(numbers),\n", + " \"sum\": sum(numbers),\n", + " \"min\": min(numbers),\n", + " \"max\": max(numbers),\n", + " \"avg\": sum(numbers) / len(numbers),\n", + " }" + ], + "metadata": { + "id": "8hUGAyi8jrzi" + }, + "execution_count": 23, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# 1. Приветствие\n", + "print(greet(\"Студент\"))\n", + "\n", + "# 2. Работа со списком\n", + "sample = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3]\n", + "stats = compute_statistics(sample)\n", + "print(f\"Список: {sample}\")\n", + "for key, value in stats.items():\n", + " print(f\" {key:>5}: {value}\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "wUcGE8CjjzE-", + "outputId": "2d59d814-9fdf-484b-d908-04cee289f368" + }, + "execution_count": 25, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Привет, Студент!\n", + "Список: [3, 1, 4, 1, 5, 9, 2, 6, 5, 3]\n", + " count: 10\n", + " sum: 39\n", + " min: 1\n", + " max: 9\n", + " avg: 3.9\n" + ] + } + ] + } + ] +} \ No newline at end of file