From 4c05fa54a8e4b9a6a93b78431ad984b635d6a3f5 Mon Sep 17 00:00:00 2001 From: Kursad <122346253+KursaDSc@users.noreply.github.com> Date: Sun, 20 Apr 2025 13:37:18 +0200 Subject: [PATCH 01/18] =?UTF-8?q?Odev=20alt=20yap=C4=B1s=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Customer_Management_System/add_customer.py | 0 Customer_Management_System/ali/main.py | 0 Customer_Management_System/delete_customer.py | 0 Customer_Management_System/furkan/main.py | 0 Customer_Management_System/kursad/main.py | 0 Customer_Management_System/list_customers.py | 0 Customer_Management_System/main.py | 0 Customer_Management_System/mehmet/main.py | 0 Customer_Management_System/mustafa/main.py | 0 Customer_Management_System/update_customer.py | 0 Film_Library_Management_System/add_movie.py | 0 Film_Library_Management_System/ali/main.py | 0 .../edit_delete_movie.py | 0 .../file_operations.py | 0 Film_Library_Management_System/furkan/main.py | 0 Film_Library_Management_System/kursad/main.py | 0 Film_Library_Management_System/main.py | 0 Film_Library_Management_System/mehmet/main.py | 0 .../mustafa/main.py | 0 .../view_collection.py | 0 Odev.md | 65 ++++++++++++++ README.md | 86 +++++++------------ Student_Grades_Calculation/ali/main.py | 0 Student_Grades_Calculation/furkan/main.py | 0 Student_Grades_Calculation/kursad/main.py | 0 Student_Grades_Calculation/mehmet/main.py | 0 Student_Grades_Calculation/mustafa/main.py | 0 27 files changed, 98 insertions(+), 53 deletions(-) create mode 100644 Customer_Management_System/add_customer.py create mode 100644 Customer_Management_System/ali/main.py create mode 100644 Customer_Management_System/delete_customer.py create mode 100644 Customer_Management_System/furkan/main.py create mode 100644 Customer_Management_System/kursad/main.py create mode 100644 Customer_Management_System/list_customers.py create mode 100644 Customer_Management_System/main.py create mode 100644 Customer_Management_System/mehmet/main.py create mode 100644 Customer_Management_System/mustafa/main.py create mode 100644 Customer_Management_System/update_customer.py create mode 100644 Film_Library_Management_System/add_movie.py create mode 100644 Film_Library_Management_System/ali/main.py create mode 100644 Film_Library_Management_System/edit_delete_movie.py create mode 100644 Film_Library_Management_System/file_operations.py create mode 100644 Film_Library_Management_System/furkan/main.py create mode 100644 Film_Library_Management_System/kursad/main.py create mode 100644 Film_Library_Management_System/main.py create mode 100644 Film_Library_Management_System/mehmet/main.py create mode 100644 Film_Library_Management_System/mustafa/main.py create mode 100644 Film_Library_Management_System/view_collection.py create mode 100644 Odev.md create mode 100644 Student_Grades_Calculation/ali/main.py create mode 100644 Student_Grades_Calculation/furkan/main.py create mode 100644 Student_Grades_Calculation/kursad/main.py create mode 100644 Student_Grades_Calculation/mehmet/main.py create mode 100644 Student_Grades_Calculation/mustafa/main.py diff --git a/Customer_Management_System/add_customer.py b/Customer_Management_System/add_customer.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/ali/main.py b/Customer_Management_System/ali/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/delete_customer.py b/Customer_Management_System/delete_customer.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/furkan/main.py b/Customer_Management_System/furkan/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/kursad/main.py b/Customer_Management_System/kursad/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/list_customers.py b/Customer_Management_System/list_customers.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/main.py b/Customer_Management_System/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/mehmet/main.py b/Customer_Management_System/mehmet/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/mustafa/main.py b/Customer_Management_System/mustafa/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Customer_Management_System/update_customer.py b/Customer_Management_System/update_customer.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/add_movie.py b/Film_Library_Management_System/add_movie.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/ali/main.py b/Film_Library_Management_System/ali/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/edit_delete_movie.py b/Film_Library_Management_System/edit_delete_movie.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/file_operations.py b/Film_Library_Management_System/file_operations.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/furkan/main.py b/Film_Library_Management_System/furkan/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/kursad/main.py b/Film_Library_Management_System/kursad/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/main.py b/Film_Library_Management_System/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/mehmet/main.py b/Film_Library_Management_System/mehmet/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/mustafa/main.py b/Film_Library_Management_System/mustafa/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Film_Library_Management_System/view_collection.py b/Film_Library_Management_System/view_collection.py new file mode 100644 index 0000000..e69de29 diff --git a/Odev.md b/Odev.md new file mode 100644 index 0000000..e850c92 --- /dev/null +++ b/Odev.md @@ -0,0 +1,65 @@ +# Python_Modul_Week_2 + +### Question1: Student Grades Processing + +You need to write a Python program to process a student's grades. The program needs to perform the following functions: + +Store information and notes for 10 students using a dictionary. Let each student have their name, surname and grades (Midterm, Final and Oral grades). For example: + +![image](https://github.com/user-attachments/assets/0e3f85a4-bf24-4b22-b0ea-f9b3dbda4fc8) + +1-Calculate each student's GPA and add it to the dictionary. + +2-Find the student with the highest GPA and print it on the screen. + +3- Separate each student's name from their surname and store them in a separate tuple and add them to a list. + +4-Sort the names in alphabetical order and print the sorted list on the screen. + +5-Keep students with a GPA below 70 in a cluster (set). + +### Question 2: Film Library Management System Project + +Project Description: This project aims to create an application that will help the user manage their movie collection. Users can add, edit, delete movies and view their collection. + +Data Structures Used: Dictionaries (to store movies and related information), lists (to display movie collection) + +Basic Functions: + +1-Create a movie data by taking information such as movie name, director, release year and genre from the user and store it in a dictionary. + +2-Give the user the option to edit or delete a movie. (For this, a suitable function must be written for whatever data they want to change about the movie.) + +3-Allow the user to view their collection. List all movies or filter by criteria such as genre or year of release. + +4-Save the movie data in a file and restore this data when you start the program. + +### Question 3: Customer Management System +Project Description: This project involves you creating a customer management system that you can use to manage your customers and perform basic transactions. This system will have basic functions such as storing customer information, adding new customers, updating customer information, deleting customers and viewing the customer list. Here are the basic steps of the project: + +1-Use a dictionary structure to store customer information. Assign a unique customer identification (ID) for each customer and associate customer information with this ID. You can use a dictionary containing information such as name, surname, e-mail, phone number for each customer. + +2-Provide a menu where the user can choose the following actions: + +* Add new customers +* Updating customer information +* Delete customer +* List all customers +* Check out + +3-Perform the relevant action according to the user's choice. For example, when adding a new customer, get the required information from the user and add a new customer to the dictionary. + +4-When updating customer information, view the current information using the customer ID and save the updated information. + +5-In the customer deletion process, get the customer ID from the user and delete this customer from the dictionary. + +6-In the process of listing all customers, view the list of existing customers. + +7-Repeat the process until the user logs out. + +## 2.Hackerrank +1. https://www.hackerrank.com/challenges/list-comprehensions/problem +2. https://www.hackerrank.com/challenges/python-tuples/problem +3. https://www.hackerrank.com/challenges/nested-list/problem (edited) . + +Good luck! diff --git a/README.md b/README.md index e850c92..0cffe86 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,45 @@ -# Python_Modul_Week_2 +# Python_Modul_Week_2 – Team Plan -### Question1: Student Grades Processing +## Team Members: +- Kürşad (Team Leader) +- Ali +- Furkan +- Mehmet Lütfi +- Mustafa -You need to write a Python program to process a student's grades. The program needs to perform the following functions: +--- -Store information and notes for 10 students using a dictionary. Let each student have their name, surname and grades (Midterm, Final and Oral grades). For example: +## Project 1: Student Grades Calculation -![image](https://github.com/user-attachments/assets/0e3f85a4-bf24-4b22-b0ea-f9b3dbda4fc8) +### Görev Dağılımı: +- **Ali**: input_students.py – Öğrencilerin bilgilerini (isim, soyisim, notlar) alan modül. +- **Furkan**: calculate_gpa.py – Notlardan ortalama (GPA) hesaplayan fonksiyon. +- **Mehmet Lütfi**: analyze_gpa.py – En yüksek GPA'yı bulma ve düşük GPA'ları kümeleme. +- **Mustafa**: sort_and_display.py – İsimleri ayırma, sıralama ve gösterme. +- **Kürşad**: main.py – Tüm modülleri entegre eder, genel akışı yönetir. -1-Calculate each student's GPA and add it to the dictionary. +--- -2-Find the student with the highest GPA and print it on the screen. +## Project 2: Film Library Management System -3- Separate each student's name from their surname and store them in a separate tuple and add them to a list. +### Görev Dağılımı: +- **Furkan**: add_movie.py – Film ekleme fonksiyonunu geliştirir. +- **Mehmet Lütfi**: edit_delete_movie.py – Film düzenleme ve silme fonksiyonları. +- **Mustafa**: view_collection.py – Film listesini görüntüleme ve filtreleme işlemleri. +- **Ali**: file_operations.py – Veriyi dosyaya kaydetme/yükleme işlemleri. +- **Kürşad**: main.py – Tüm modülleri entegre eder, menüyü yönetir. -4-Sort the names in alphabetical order and print the sorted list on the screen. +--- -5-Keep students with a GPA below 70 in a cluster (set). +## Project 3: Customer Management System -### Question 2: Film Library Management System Project +### Görev Dağılımı: +- **Mehmet Lütfi**: add_customer.py – Müşteri ekleme işlemleri. +- **Mustafa**: update_customer.py – Müşteri bilgilerini güncelleme. +- **Ali**: delete_customer.py – Müşteri silme işlemi. +- **Furkan**: list_customers.py – Müşteri listesini gösterme. +- **Kürşad**: main.py – Menü ve kullanıcı etkileşimini sağlar. -Project Description: This project aims to create an application that will help the user manage their movie collection. Users can add, edit, delete movies and view their collection. +--- -Data Structures Used: Dictionaries (to store movies and related information), lists (to display movie collection) - -Basic Functions: - -1-Create a movie data by taking information such as movie name, director, release year and genre from the user and store it in a dictionary. - -2-Give the user the option to edit or delete a movie. (For this, a suitable function must be written for whatever data they want to change about the movie.) - -3-Allow the user to view their collection. List all movies or filter by criteria such as genre or year of release. - -4-Save the movie data in a file and restore this data when you start the program. - -### Question 3: Customer Management System -Project Description: This project involves you creating a customer management system that you can use to manage your customers and perform basic transactions. This system will have basic functions such as storing customer information, adding new customers, updating customer information, deleting customers and viewing the customer list. Here are the basic steps of the project: - -1-Use a dictionary structure to store customer information. Assign a unique customer identification (ID) for each customer and associate customer information with this ID. You can use a dictionary containing information such as name, surname, e-mail, phone number for each customer. - -2-Provide a menu where the user can choose the following actions: - -* Add new customers -* Updating customer information -* Delete customer -* List all customers -* Check out - -3-Perform the relevant action according to the user's choice. For example, when adding a new customer, get the required information from the user and add a new customer to the dictionary. - -4-When updating customer information, view the current information using the customer ID and save the updated information. - -5-In the customer deletion process, get the customer ID from the user and delete this customer from the dictionary. - -6-In the process of listing all customers, view the list of existing customers. - -7-Repeat the process until the user logs out. - -## 2.Hackerrank -1. https://www.hackerrank.com/challenges/list-comprehensions/problem -2. https://www.hackerrank.com/challenges/python-tuples/problem -3. https://www.hackerrank.com/challenges/nested-list/problem (edited) . - -Good luck! +Her bir modül işlevsel olarak bağımsızdır. Takım üyeleri geliştirdikleri modülü `main.py` dosyası ile entegre ederek test edeceklerdir. Testler tamamlandıktan sonra `main.py` dosyası ile birlikte çözüm GitHub’a push edilecektir. diff --git a/Student_Grades_Calculation/ali/main.py b/Student_Grades_Calculation/ali/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Student_Grades_Calculation/furkan/main.py b/Student_Grades_Calculation/furkan/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Student_Grades_Calculation/kursad/main.py b/Student_Grades_Calculation/kursad/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Student_Grades_Calculation/mehmet/main.py b/Student_Grades_Calculation/mehmet/main.py new file mode 100644 index 0000000..e69de29 diff --git a/Student_Grades_Calculation/mustafa/main.py b/Student_Grades_Calculation/mustafa/main.py new file mode 100644 index 0000000..e69de29 From 1461fc025aaa818a42d83841227e4f577b776b98 Mon Sep 17 00:00:00 2001 From: Kursad <122346253+KursaDSc@users.noreply.github.com> Date: Mon, 21 Apr 2025 03:45:18 +0200 Subject: [PATCH 02/18] =?UTF-8?q?py=20--->=20=C4=B1pynb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. soruda py dosyası yerine jupiter notebook --- Student_Grades_Calculation/ali/grades.ipynb | 223 ++++++++++++++++++ Student_Grades_Calculation/ali/main.py | 0 .../furkan/grades.ipynb | 223 ++++++++++++++++++ Student_Grades_Calculation/furkan/main.py | 0 .../kursad/grades.ipynb | 223 ++++++++++++++++++ Student_Grades_Calculation/kursad/main.py | 0 .../mehmet/grades.ipynb | 223 ++++++++++++++++++ Student_Grades_Calculation/mehmet/main.py | 0 .../mustafa/grades.ipynb | 223 ++++++++++++++++++ Student_Grades_Calculation/mustafa/main.py | 0 10 files changed, 1115 insertions(+) create mode 100644 Student_Grades_Calculation/ali/grades.ipynb delete mode 100644 Student_Grades_Calculation/ali/main.py create mode 100644 Student_Grades_Calculation/furkan/grades.ipynb delete mode 100644 Student_Grades_Calculation/furkan/main.py create mode 100644 Student_Grades_Calculation/kursad/grades.ipynb delete mode 100644 Student_Grades_Calculation/kursad/main.py create mode 100644 Student_Grades_Calculation/mehmet/grades.ipynb delete mode 100644 Student_Grades_Calculation/mehmet/main.py create mode 100644 Student_Grades_Calculation/mustafa/grades.ipynb delete mode 100644 Student_Grades_Calculation/mustafa/main.py diff --git a/Student_Grades_Calculation/ali/grades.ipynb b/Student_Grades_Calculation/ali/grades.ipynb new file mode 100644 index 0000000..9b2a534 --- /dev/null +++ b/Student_Grades_Calculation/ali/grades.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Question1: Student Grades Processing\n", + "You need to write a Python program to process a student's grades. The program needs to perform the following functions:\n", + "\n", + "Store information and notes for 10 students using a dictionary. Let each student have their name, surname and grades (Midterm, Final and Oral grades). For example:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "students = {\n", + " 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78\n", + " 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76\n", + " 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95\n", + " 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80\n", + " 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55\n", + " 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90\n", + " 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74\n", + " 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88\n", + " 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55\n", + " 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "1-Calculate each student's GPA and add it to the dictionary." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Ahmet Yılmaz': [85, 90, 78, 85],\n", + " 'Mehmet Demir': [92, 88, 76, 86],\n", + " 'Ayşe Kaya': [78, 89, 95, 88],\n", + " 'Zeynep Çelik': [65, 70, 80, 72],\n", + " 'Ali Kara': [50, 60, 55, 55],\n", + " 'Fatma Yıldız': [88, 85, 90, 88],\n", + " 'Murat Aydın': [72, 68, 74, 72],\n", + " 'Elif Aksoy': [95, 90, 88, 91],\n", + " 'Hakan Öztürk': [45, 50, 55, 50],\n", + " 'Canan Taş': [80, 75, 82, 79]}" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "\n", + "for grade in students.items():\n", + " grade[1].append(math.ceil(np.mean(grade[1])))\n", + " \n", + "students" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2-Find the student with the highest GPA and print it on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " En yuksek GPA'ya sahip ogrenciler: Elif Aksoy, GPA : 91\n" + ] + } + ], + "source": [ + "gpa = max(grade[1][3] for grade in students.items())\n", + "student_names = [grade[0] for grade in students.items() if grade[1][3] == gpa]\n", + "\n", + "print(f\" En yuksek GPA'ya sahip ogrenciler: {\", \".join(student_names)}, GPA : {gpa}\" )" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "3- Separate each student's name from their surname and store them in a separate tuple and add them to a list." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('Ahmet', 'Mehmet', 'Ayşe', 'Zeynep', 'Ali', 'Fatma', 'Murat', 'Elif', 'Hakan', 'Canan') ('Yılmaz', 'Demir', 'Kaya', 'Çelik', 'Kara', 'Yıldız', 'Aydın', 'Aksoy', 'Öztürk', 'Taş')\n" + ] + } + ], + "source": [ + "def get_names(students):\n", + " names = tuple(grade[0].split()[0] for grade in students.items())\n", + " surnames = tuple(grade[0].split()[1] for grade in students.items())\n", + " return names, surnames\n", + "\n", + "names, surnames = get_names(students)\n", + "print(names, surnames)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "4-Sort the names in alphabetical order and print the sorted list on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ahmet\n", + "Ali\n", + "Ayşe\n", + "Canan\n", + "Elif\n", + "Fatma\n", + "Hakan\n", + "Mehmet\n", + "Murat\n", + "Zeynep\n" + ] + } + ], + "source": [ + "for name in sorted(names):\n", + " print(name)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "5-Keep students with a GPA below 70 in a cluster (set)." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'Hakan Öztürk', 'Ali Kara'}\n" + ] + } + ], + "source": [ + "students_below70 = set(student[0] for student in students.items() if student[1][-1] < 70)\n", + "\n", + "print(students_below70)" + ] + } + ], + "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.13.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Student_Grades_Calculation/ali/main.py b/Student_Grades_Calculation/ali/main.py deleted file mode 100644 index e69de29..0000000 diff --git a/Student_Grades_Calculation/furkan/grades.ipynb b/Student_Grades_Calculation/furkan/grades.ipynb new file mode 100644 index 0000000..9b2a534 --- /dev/null +++ b/Student_Grades_Calculation/furkan/grades.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Question1: Student Grades Processing\n", + "You need to write a Python program to process a student's grades. The program needs to perform the following functions:\n", + "\n", + "Store information and notes for 10 students using a dictionary. Let each student have their name, surname and grades (Midterm, Final and Oral grades). For example:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "students = {\n", + " 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78\n", + " 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76\n", + " 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95\n", + " 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80\n", + " 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55\n", + " 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90\n", + " 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74\n", + " 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88\n", + " 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55\n", + " 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "1-Calculate each student's GPA and add it to the dictionary." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Ahmet Yılmaz': [85, 90, 78, 85],\n", + " 'Mehmet Demir': [92, 88, 76, 86],\n", + " 'Ayşe Kaya': [78, 89, 95, 88],\n", + " 'Zeynep Çelik': [65, 70, 80, 72],\n", + " 'Ali Kara': [50, 60, 55, 55],\n", + " 'Fatma Yıldız': [88, 85, 90, 88],\n", + " 'Murat Aydın': [72, 68, 74, 72],\n", + " 'Elif Aksoy': [95, 90, 88, 91],\n", + " 'Hakan Öztürk': [45, 50, 55, 50],\n", + " 'Canan Taş': [80, 75, 82, 79]}" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "\n", + "for grade in students.items():\n", + " grade[1].append(math.ceil(np.mean(grade[1])))\n", + " \n", + "students" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2-Find the student with the highest GPA and print it on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " En yuksek GPA'ya sahip ogrenciler: Elif Aksoy, GPA : 91\n" + ] + } + ], + "source": [ + "gpa = max(grade[1][3] for grade in students.items())\n", + "student_names = [grade[0] for grade in students.items() if grade[1][3] == gpa]\n", + "\n", + "print(f\" En yuksek GPA'ya sahip ogrenciler: {\", \".join(student_names)}, GPA : {gpa}\" )" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "3- Separate each student's name from their surname and store them in a separate tuple and add them to a list." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('Ahmet', 'Mehmet', 'Ayşe', 'Zeynep', 'Ali', 'Fatma', 'Murat', 'Elif', 'Hakan', 'Canan') ('Yılmaz', 'Demir', 'Kaya', 'Çelik', 'Kara', 'Yıldız', 'Aydın', 'Aksoy', 'Öztürk', 'Taş')\n" + ] + } + ], + "source": [ + "def get_names(students):\n", + " names = tuple(grade[0].split()[0] for grade in students.items())\n", + " surnames = tuple(grade[0].split()[1] for grade in students.items())\n", + " return names, surnames\n", + "\n", + "names, surnames = get_names(students)\n", + "print(names, surnames)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "4-Sort the names in alphabetical order and print the sorted list on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ahmet\n", + "Ali\n", + "Ayşe\n", + "Canan\n", + "Elif\n", + "Fatma\n", + "Hakan\n", + "Mehmet\n", + "Murat\n", + "Zeynep\n" + ] + } + ], + "source": [ + "for name in sorted(names):\n", + " print(name)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "5-Keep students with a GPA below 70 in a cluster (set)." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'Hakan Öztürk', 'Ali Kara'}\n" + ] + } + ], + "source": [ + "students_below70 = set(student[0] for student in students.items() if student[1][-1] < 70)\n", + "\n", + "print(students_below70)" + ] + } + ], + "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.13.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Student_Grades_Calculation/furkan/main.py b/Student_Grades_Calculation/furkan/main.py deleted file mode 100644 index e69de29..0000000 diff --git a/Student_Grades_Calculation/kursad/grades.ipynb b/Student_Grades_Calculation/kursad/grades.ipynb new file mode 100644 index 0000000..9b2a534 --- /dev/null +++ b/Student_Grades_Calculation/kursad/grades.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Question1: Student Grades Processing\n", + "You need to write a Python program to process a student's grades. The program needs to perform the following functions:\n", + "\n", + "Store information and notes for 10 students using a dictionary. Let each student have their name, surname and grades (Midterm, Final and Oral grades). For example:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "students = {\n", + " 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78\n", + " 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76\n", + " 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95\n", + " 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80\n", + " 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55\n", + " 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90\n", + " 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74\n", + " 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88\n", + " 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55\n", + " 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "1-Calculate each student's GPA and add it to the dictionary." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Ahmet Yılmaz': [85, 90, 78, 85],\n", + " 'Mehmet Demir': [92, 88, 76, 86],\n", + " 'Ayşe Kaya': [78, 89, 95, 88],\n", + " 'Zeynep Çelik': [65, 70, 80, 72],\n", + " 'Ali Kara': [50, 60, 55, 55],\n", + " 'Fatma Yıldız': [88, 85, 90, 88],\n", + " 'Murat Aydın': [72, 68, 74, 72],\n", + " 'Elif Aksoy': [95, 90, 88, 91],\n", + " 'Hakan Öztürk': [45, 50, 55, 50],\n", + " 'Canan Taş': [80, 75, 82, 79]}" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "\n", + "for grade in students.items():\n", + " grade[1].append(math.ceil(np.mean(grade[1])))\n", + " \n", + "students" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2-Find the student with the highest GPA and print it on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " En yuksek GPA'ya sahip ogrenciler: Elif Aksoy, GPA : 91\n" + ] + } + ], + "source": [ + "gpa = max(grade[1][3] for grade in students.items())\n", + "student_names = [grade[0] for grade in students.items() if grade[1][3] == gpa]\n", + "\n", + "print(f\" En yuksek GPA'ya sahip ogrenciler: {\", \".join(student_names)}, GPA : {gpa}\" )" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "3- Separate each student's name from their surname and store them in a separate tuple and add them to a list." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('Ahmet', 'Mehmet', 'Ayşe', 'Zeynep', 'Ali', 'Fatma', 'Murat', 'Elif', 'Hakan', 'Canan') ('Yılmaz', 'Demir', 'Kaya', 'Çelik', 'Kara', 'Yıldız', 'Aydın', 'Aksoy', 'Öztürk', 'Taş')\n" + ] + } + ], + "source": [ + "def get_names(students):\n", + " names = tuple(grade[0].split()[0] for grade in students.items())\n", + " surnames = tuple(grade[0].split()[1] for grade in students.items())\n", + " return names, surnames\n", + "\n", + "names, surnames = get_names(students)\n", + "print(names, surnames)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "4-Sort the names in alphabetical order and print the sorted list on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ahmet\n", + "Ali\n", + "Ayşe\n", + "Canan\n", + "Elif\n", + "Fatma\n", + "Hakan\n", + "Mehmet\n", + "Murat\n", + "Zeynep\n" + ] + } + ], + "source": [ + "for name in sorted(names):\n", + " print(name)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "5-Keep students with a GPA below 70 in a cluster (set)." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'Hakan Öztürk', 'Ali Kara'}\n" + ] + } + ], + "source": [ + "students_below70 = set(student[0] for student in students.items() if student[1][-1] < 70)\n", + "\n", + "print(students_below70)" + ] + } + ], + "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.13.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Student_Grades_Calculation/kursad/main.py b/Student_Grades_Calculation/kursad/main.py deleted file mode 100644 index e69de29..0000000 diff --git a/Student_Grades_Calculation/mehmet/grades.ipynb b/Student_Grades_Calculation/mehmet/grades.ipynb new file mode 100644 index 0000000..9b2a534 --- /dev/null +++ b/Student_Grades_Calculation/mehmet/grades.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Question1: Student Grades Processing\n", + "You need to write a Python program to process a student's grades. The program needs to perform the following functions:\n", + "\n", + "Store information and notes for 10 students using a dictionary. Let each student have their name, surname and grades (Midterm, Final and Oral grades). For example:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "students = {\n", + " 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78\n", + " 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76\n", + " 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95\n", + " 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80\n", + " 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55\n", + " 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90\n", + " 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74\n", + " 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88\n", + " 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55\n", + " 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "1-Calculate each student's GPA and add it to the dictionary." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Ahmet Yılmaz': [85, 90, 78, 85],\n", + " 'Mehmet Demir': [92, 88, 76, 86],\n", + " 'Ayşe Kaya': [78, 89, 95, 88],\n", + " 'Zeynep Çelik': [65, 70, 80, 72],\n", + " 'Ali Kara': [50, 60, 55, 55],\n", + " 'Fatma Yıldız': [88, 85, 90, 88],\n", + " 'Murat Aydın': [72, 68, 74, 72],\n", + " 'Elif Aksoy': [95, 90, 88, 91],\n", + " 'Hakan Öztürk': [45, 50, 55, 50],\n", + " 'Canan Taş': [80, 75, 82, 79]}" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "\n", + "for grade in students.items():\n", + " grade[1].append(math.ceil(np.mean(grade[1])))\n", + " \n", + "students" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2-Find the student with the highest GPA and print it on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " En yuksek GPA'ya sahip ogrenciler: Elif Aksoy, GPA : 91\n" + ] + } + ], + "source": [ + "gpa = max(grade[1][3] for grade in students.items())\n", + "student_names = [grade[0] for grade in students.items() if grade[1][3] == gpa]\n", + "\n", + "print(f\" En yuksek GPA'ya sahip ogrenciler: {\", \".join(student_names)}, GPA : {gpa}\" )" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "3- Separate each student's name from their surname and store them in a separate tuple and add them to a list." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('Ahmet', 'Mehmet', 'Ayşe', 'Zeynep', 'Ali', 'Fatma', 'Murat', 'Elif', 'Hakan', 'Canan') ('Yılmaz', 'Demir', 'Kaya', 'Çelik', 'Kara', 'Yıldız', 'Aydın', 'Aksoy', 'Öztürk', 'Taş')\n" + ] + } + ], + "source": [ + "def get_names(students):\n", + " names = tuple(grade[0].split()[0] for grade in students.items())\n", + " surnames = tuple(grade[0].split()[1] for grade in students.items())\n", + " return names, surnames\n", + "\n", + "names, surnames = get_names(students)\n", + "print(names, surnames)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "4-Sort the names in alphabetical order and print the sorted list on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ahmet\n", + "Ali\n", + "Ayşe\n", + "Canan\n", + "Elif\n", + "Fatma\n", + "Hakan\n", + "Mehmet\n", + "Murat\n", + "Zeynep\n" + ] + } + ], + "source": [ + "for name in sorted(names):\n", + " print(name)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "5-Keep students with a GPA below 70 in a cluster (set)." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'Hakan Öztürk', 'Ali Kara'}\n" + ] + } + ], + "source": [ + "students_below70 = set(student[0] for student in students.items() if student[1][-1] < 70)\n", + "\n", + "print(students_below70)" + ] + } + ], + "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.13.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Student_Grades_Calculation/mehmet/main.py b/Student_Grades_Calculation/mehmet/main.py deleted file mode 100644 index e69de29..0000000 diff --git a/Student_Grades_Calculation/mustafa/grades.ipynb b/Student_Grades_Calculation/mustafa/grades.ipynb new file mode 100644 index 0000000..9b2a534 --- /dev/null +++ b/Student_Grades_Calculation/mustafa/grades.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Question1: Student Grades Processing\n", + "You need to write a Python program to process a student's grades. The program needs to perform the following functions:\n", + "\n", + "Store information and notes for 10 students using a dictionary. Let each student have their name, surname and grades (Midterm, Final and Oral grades). For example:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "students = {\n", + " 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78\n", + " 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76\n", + " 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95\n", + " 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80\n", + " 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55\n", + " 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90\n", + " 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74\n", + " 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88\n", + " 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55\n", + " 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "1-Calculate each student's GPA and add it to the dictionary." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Ahmet Yılmaz': [85, 90, 78, 85],\n", + " 'Mehmet Demir': [92, 88, 76, 86],\n", + " 'Ayşe Kaya': [78, 89, 95, 88],\n", + " 'Zeynep Çelik': [65, 70, 80, 72],\n", + " 'Ali Kara': [50, 60, 55, 55],\n", + " 'Fatma Yıldız': [88, 85, 90, 88],\n", + " 'Murat Aydın': [72, 68, 74, 72],\n", + " 'Elif Aksoy': [95, 90, 88, 91],\n", + " 'Hakan Öztürk': [45, 50, 55, 50],\n", + " 'Canan Taş': [80, 75, 82, 79]}" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "\n", + "for grade in students.items():\n", + " grade[1].append(math.ceil(np.mean(grade[1])))\n", + " \n", + "students" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2-Find the student with the highest GPA and print it on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " En yuksek GPA'ya sahip ogrenciler: Elif Aksoy, GPA : 91\n" + ] + } + ], + "source": [ + "gpa = max(grade[1][3] for grade in students.items())\n", + "student_names = [grade[0] for grade in students.items() if grade[1][3] == gpa]\n", + "\n", + "print(f\" En yuksek GPA'ya sahip ogrenciler: {\", \".join(student_names)}, GPA : {gpa}\" )" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "3- Separate each student's name from their surname and store them in a separate tuple and add them to a list." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('Ahmet', 'Mehmet', 'Ayşe', 'Zeynep', 'Ali', 'Fatma', 'Murat', 'Elif', 'Hakan', 'Canan') ('Yılmaz', 'Demir', 'Kaya', 'Çelik', 'Kara', 'Yıldız', 'Aydın', 'Aksoy', 'Öztürk', 'Taş')\n" + ] + } + ], + "source": [ + "def get_names(students):\n", + " names = tuple(grade[0].split()[0] for grade in students.items())\n", + " surnames = tuple(grade[0].split()[1] for grade in students.items())\n", + " return names, surnames\n", + "\n", + "names, surnames = get_names(students)\n", + "print(names, surnames)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "4-Sort the names in alphabetical order and print the sorted list on the screen." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ahmet\n", + "Ali\n", + "Ayşe\n", + "Canan\n", + "Elif\n", + "Fatma\n", + "Hakan\n", + "Mehmet\n", + "Murat\n", + "Zeynep\n" + ] + } + ], + "source": [ + "for name in sorted(names):\n", + " print(name)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "notes" + } + }, + "source": [ + "5-Keep students with a GPA below 70 in a cluster (set)." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'Hakan Öztürk', 'Ali Kara'}\n" + ] + } + ], + "source": [ + "students_below70 = set(student[0] for student in students.items() if student[1][-1] < 70)\n", + "\n", + "print(students_below70)" + ] + } + ], + "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.13.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Student_Grades_Calculation/mustafa/main.py b/Student_Grades_Calculation/mustafa/main.py deleted file mode 100644 index e69de29..0000000 From 70efabecc8f7779376e872592f6a5ab0d0b73b67 Mon Sep 17 00:00:00 2001 From: MLAcikgoz Date: Tue, 22 Apr 2025 14:13:17 +0200 Subject: [PATCH 03/18] Create ogrencilerle olan calisma --- .../mehmet/ogrencilerle olan calisma | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Student_Grades_Calculation/mehmet/ogrencilerle olan calisma diff --git a/Student_Grades_Calculation/mehmet/ogrencilerle olan calisma b/Student_Grades_Calculation/mehmet/ogrencilerle olan calisma new file mode 100644 index 0000000..2409e5b --- /dev/null +++ b/Student_Grades_Calculation/mehmet/ogrencilerle olan calisma @@ -0,0 +1,47 @@ +students = { + 'Ahmet Yilmaz': [85, 90, 78], + 'Mehmet Demir': [92, 88, 76], + 'Ayse Kaya': [78, 89, 95], + 'Zeynep Celik': [65, 70, 80], + 'Ali Kara': [50, 60, 55], + 'Fatma Yildiz': [88, 85, 90], + 'Murat Aydin': [72, 68, 74], + 'Elif Aksoy': [95, 90, 88], + 'Hakan Ozturk': [45, 50, 55], + 'Canan Tas': [80, 75, 82] +} + +# GPA'leri tutmak icin yeni bir sozluk +gpa_dict = {} + +# GPA hesapla ve her ogrenciye ekle +for isim, notlar in students.items(): + vize = notlar[0] + final = notlar[1] + sozlu = notlar[2] + + gpa = (vize * 0.3) + (final * 0.5) + (sozlu * 0.2) + gpa_dict[isim] = gpa + +# En yuksek GPA'li ogrenciyi bul +en_yuksek_gpa = -1 +en_iyi_ogrenci = "" + +for isim, gpa in gpa_dict.items(): + if gpa > en_yuksek_gpa: + en_yuksek_gpa = gpa + en_iyi_ogrenci = isim + +print("En yuksek GPA'li ogrenci:") +print(f"{en_iyi_ogrenci} - GPA: {en_yuksek_gpa:.2f}") + +# GPA'si 70'ten dusuk olan ogrencileri bir kume (set) icine al +dusuk_gpa_kumesi = set() + +for isim, gpa in gpa_dict.items(): + if gpa < 70: + dusuk_gpa_kumesi.add(isim) + +print("\nGPA'si 70'ten dusuk olan ogrenciler:") +for isim in dusuk_gpa_kumesi: + print("- " + isim) From 5af188b4a08b3484f3d9178b460e2edd12940ceb Mon Sep 17 00:00:00 2001 From: Kursad <122346253+KursaDSc@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:25:31 +0200 Subject: [PATCH 04/18] Film Library --- Film_Library_Management_System/kursad/main.py | 174 ++++++++++++++++++ .../kursad/movies.json | 38 ++++ README.md | 13 +- Student_Grades_Calculation/ali/grades.ipynb | 119 ++---------- 4 files changed, 228 insertions(+), 116 deletions(-) create mode 100644 Film_Library_Management_System/kursad/movies.json diff --git a/Film_Library_Management_System/kursad/main.py b/Film_Library_Management_System/kursad/main.py index e69de29..a6d27e2 100644 --- a/Film_Library_Management_System/kursad/main.py +++ b/Film_Library_Management_System/kursad/main.py @@ -0,0 +1,174 @@ +import json +import os +import keyboard + +clear_screen = lambda: os.system('cls' if os.name == 'nt' else 'clear') + +# Dosya yolu: bu sayede 'main.py' ile aynı klasördeki 'movies.json' dosyasına erişilir +file_path = os.path.join(os.path.dirname(__file__), "movies.json") + +# JSON verisini oku +with open(file_path, 'r', encoding="utf-8") as file: + movies = json.load(file) + +# JSON verisini güncelleme fonksiyonu +def update_movies_json(movies_dict, filename=file_path): + with open(filename, 'w', encoding='utf-8') as file: + json.dump(movies_dict, file, indent=4, ensure_ascii=False) + +def get_input(range, message="Lütfen bir işlem numarası giriniz:"): + while True: + try: + sel = int(input(message)) + if sel in range: + return sel + except ValueError: + print("lütfen gecerli bir deger giriniz") + +def menu_header(menu_name): + clear_screen() + global menu_width + menu_width = 30 + print(menu_width*'-') + print(f"\033[1;33m"+ menu_name.center(menu_width)+f"\033[0m") + print(menu_width*'-') + +def show_main_menu(): + menu_name = "Movie Library" + menu_header(menu_name) + + print("1 - Add movie") + print("2 - Delete movie") + print("3 - Edit movie") + print("4 - View all movies") + print("5 - Exit") + print(menu_width*'-') + + selection = get_input(range(1,6)) + clear_screen() + return selection + +def select_movie(message): + movie_list = [] + + for index, movie in enumerate(movies): + movie_list.append(movie) + print(f"{index+1}. {movie}") + + print(menu_width*'-') + selection = get_input(range(len(movies)+1), message ) + + clear_screen() + if selection != 0: + return movie_list[selection-1] + else: + return None + + +def show_movie_details(movie): + menu_name = movie + " - Movie Details" + menu_header(menu_name) + + print(f"Title\t\t: {movie}") + print(f"Director\t: {movies[movie]['director']}") + print(f"Release Year\t: {movies[movie]['release_year']}") + print(f"Genre\t\t: {movies[movie]['genre']}") + print(f"Lead Actor\t: {movies[movie]['lead_actor']}") + + print(menu_width*'-') + +def change_details(movie): + print(f"\n\nEditing movie: {movie}") + info = movies[movie] + for key, value in info.items(): + print(f"{key.capitalize()}: {value}") + print() + + director = input("Enter new value for director (press Enter to keep current value): ") + if director: + info["director"] = director + + release_year = input("Enter new value for voor release year (press Enter to keep current value): ") + if release_year: + info["release_year"] = release_year + genre = input("Enter the new value for the genre of the movie: ") + if genre: + info["genre"] = genre + lead_actor = input("Enter the new value for the lead actor of the movie: ") + if lead_actor: + info["lead_actor"] = lead_actor + update_movies_json(movies) + print("Movie edited successfully!") + input("Press Enter to continue...") + + + +def delete_movie(): + menu_name = "Delete Movie" + menu_header(menu_name) + message = "Silmek istediğiniz filmin numarasını giriniz, vazgeçmek için 0'a basınsınız :" + movie = select_movie(message) + + if movie != None: + if input(f"\nAre you sure you want to delete ? (Y/N) : ").lower() == "y": + del movies[movie] + update_movies_json(movies) + print("Movie deleted successfully!") + input("Press Enter to continue...") + +def edit_movie(): + menu_name = "Edit Movie" + menu_header(menu_name) + message = "Düzenlemek istediğiniz filmin numarasını giriniz, vazgeçmek için 0'a basınsınız :" + movie = select_movie(message) + + if movie != None: + show_movie_details(movie) + change_details(movie) + +def view_movies(): + menu_name = "View Movies" + menu_header(menu_name) + + for movie in movies: + show_movie_details(movie) + input("Press Enter to continue...") + +def get_new_movie(): + info = {} + title = input("Movie name : ") + info["director"] = input("Director: ") + info["release_year"] = int(get_input(range(1900,2100),"Release Year: ")) + info["genre"] = input("Genre: ") + info["lead_actor"] = input("Lead Actor: ") + + return title, info + +def add_movie(): + menu_name = "Add Movie" + menu_header(menu_name) + + title, info = get_new_movie() + movies[title] = info + update_movies_json(movies) + print("\nMovie added successfully!") + input("Press Enter to continue...") + +while True: + selection = show_main_menu() + if selection == 1: + add_movie() + elif selection == 2: + delete_movie() + elif selection == 3: + edit_movie() + elif selection == 4: + view_movies() + elif selection == 5: + break + + + + + + diff --git a/Film_Library_Management_System/kursad/movies.json b/Film_Library_Management_System/kursad/movies.json new file mode 100644 index 0000000..f044922 --- /dev/null +++ b/Film_Library_Management_System/kursad/movies.json @@ -0,0 +1,38 @@ +{ + "The Shawshank Redemption": { + "director": "Frank Darabont", + "release_year": 1994, + "genre": "Drama", + "lead_actor": "Tim Robbins" + }, + "The Godfather": { + "director": "Francis Ford Coppola", + "release_year": 1972, + "genre": "Crime", + "lead_actor": "Marlon Brando" + }, + "Forrest Gump": { + "director": "Robert Zemeckis", + "release_year": 1994, + "genre": "Drama", + "lead_actor": "Tom Hanks" + }, + "Inception": { + "director": "Christopher Nolan", + "release_year": 2010, + "genre": "Sci-Fi", + "lead_actor": "Leonardo DiCaprio" + }, + "The Matrix": { + "director": "Lana Wachowski, Lilly Wachowski", + "release_year": 1999, + "genre": "Sci-Fi", + "lead_actor": "Keanu Reeves" + }, + "Titanic": { + "director": "James Cameron", + "release_year": 1997, + "genre": "Romance", + "lead_actor": "Leonardo DiCaprio" + } +} \ No newline at end of file diff --git a/README.md b/README.md index 0cffe86..96e8a19 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Python_Modul_Week_2 – Team Plan ## Team Members: -- Kürşad (Team Leader) +- Kürşad - Ali - Furkan - Mehmet Lütfi @@ -9,17 +9,6 @@ --- -## Project 1: Student Grades Calculation - -### Görev Dağılımı: -- **Ali**: input_students.py – Öğrencilerin bilgilerini (isim, soyisim, notlar) alan modül. -- **Furkan**: calculate_gpa.py – Notlardan ortalama (GPA) hesaplayan fonksiyon. -- **Mehmet Lütfi**: analyze_gpa.py – En yüksek GPA'yı bulma ve düşük GPA'ları kümeleme. -- **Mustafa**: sort_and_display.py – İsimleri ayırma, sıralama ve gösterme. -- **Kürşad**: main.py – Tüm modülleri entegre eder, genel akışı yönetir. - ---- - ## Project 2: Film Library Management System ### Görev Dağılımı: diff --git a/Student_Grades_Calculation/ali/grades.ipynb b/Student_Grades_Calculation/ali/grades.ipynb index 9b2a534..7ddc06f 100644 --- a/Student_Grades_Calculation/ali/grades.ipynb +++ b/Student_Grades_Calculation/ali/grades.ipynb @@ -41,36 +41,8 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'Ahmet Yılmaz': [85, 90, 78, 85],\n", - " 'Mehmet Demir': [92, 88, 76, 86],\n", - " 'Ayşe Kaya': [78, 89, 95, 88],\n", - " 'Zeynep Çelik': [65, 70, 80, 72],\n", - " 'Ali Kara': [50, 60, 55, 55],\n", - " 'Fatma Yıldız': [88, 85, 90, 88],\n", - " 'Murat Aydın': [72, 68, 74, 72],\n", - " 'Elif Aksoy': [95, 90, 88, 91],\n", - " 'Hakan Öztürk': [45, 50, 55, 50],\n", - " 'Canan Taş': [80, 75, 82, 79]}" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "import math\n", - "import numpy as np\n", - "\n", - "for grade in students.items():\n", - " grade[1].append(math.ceil(np.mean(grade[1])))\n", - " \n", - "students" - ] + "outputs": [], + "source": [] }, { "cell_type": "markdown", @@ -81,23 +53,10 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " En yuksek GPA'ya sahip ogrenciler: Elif Aksoy, GPA : 91\n" - ] - } - ], - "source": [ - "gpa = max(grade[1][3] for grade in students.items())\n", - "student_names = [grade[0] for grade in students.items() if grade[1][3] == gpa]\n", - "\n", - "print(f\" En yuksek GPA'ya sahip ogrenciler: {\", \".join(student_names)}, GPA : {gpa}\" )" - ] + "outputs": [], + "source": [] }, { "cell_type": "markdown", @@ -109,26 +68,10 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "('Ahmet', 'Mehmet', 'Ayşe', 'Zeynep', 'Ali', 'Fatma', 'Murat', 'Elif', 'Hakan', 'Canan') ('Yılmaz', 'Demir', 'Kaya', 'Çelik', 'Kara', 'Yıldız', 'Aydın', 'Aksoy', 'Öztürk', 'Taş')\n" - ] - } - ], - "source": [ - "def get_names(students):\n", - " names = tuple(grade[0].split()[0] for grade in students.items())\n", - " surnames = tuple(grade[0].split()[1] for grade in students.items())\n", - " return names, surnames\n", - "\n", - "names, surnames = get_names(students)\n", - "print(names, surnames)" - ] + "outputs": [], + "source": [] }, { "cell_type": "markdown", @@ -143,30 +86,10 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Ahmet\n", - "Ali\n", - "Ayşe\n", - "Canan\n", - "Elif\n", - "Fatma\n", - "Hakan\n", - "Mehmet\n", - "Murat\n", - "Zeynep\n" - ] - } - ], - "source": [ - "for name in sorted(names):\n", - " print(name)" - ] + "outputs": [], + "source": [] }, { "cell_type": "markdown", @@ -181,22 +104,10 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'Hakan Öztürk', 'Ali Kara'}\n" - ] - } - ], - "source": [ - "students_below70 = set(student[0] for student in students.items() if student[1][-1] < 70)\n", - "\n", - "print(students_below70)" - ] + "outputs": [], + "source": [] } ], "metadata": { @@ -215,7 +126,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.13.2" + "version": "3.13.3" } }, "nbformat": 4, From 60a847afbc54827348dad6dc818a297d0878c319 Mon Sep 17 00:00:00 2001 From: FurkanBilal Date: Fri, 25 Apr 2025 01:18:25 +0200 Subject: [PATCH 05/18] Create furkan.py --- Student_Grades_Calculation/furkan/furkan.py | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Student_Grades_Calculation/furkan/furkan.py diff --git a/Student_Grades_Calculation/furkan/furkan.py b/Student_Grades_Calculation/furkan/furkan.py new file mode 100644 index 0000000..e36fa9d --- /dev/null +++ b/Student_Grades_Calculation/furkan/furkan.py @@ -0,0 +1,35 @@ +students = { + 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78 + 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76 + 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95 + 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80 + 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55 + 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90 + 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74 + 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88 + 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55 + 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82 +} +yukseknot = 0 +yuksekogrenci = "" +ads = [] +soyads= [] +alfabetik = [] +zayif = [] +for student, noot in students.items(): + mid,final,oral = noot + ort= (mid * 0.3 + final * 0.5 + oral * 0.2) + if ort > yukseknot: + yukseknot = ort + yuksekogrenci = student + if ort < 70: + zayif.append(student) +print("En yüksek notu alan öğrenci: ", yuksekogrenci) +for isim in students.keys(): + ad, soyad = isim.split() + ads.append(ad) + soyads.append(soyad) +print("Ogrenciler: ") +for isim in sorted(students.keys()): + print(isim) +print("70 altı GPA ya sahip olan ogrenciler: ",zayif) From 45f711bb04883922e0910e535854734ce370d625 Mon Sep 17 00:00:00 2001 From: FurkanBilal Date: Fri, 25 Apr 2025 01:25:40 +0200 Subject: [PATCH 06/18] Add files via upload --- project1_furkan.py | 35 +++++++++++++++++++++++++++++++++++ project2_furkan.py | 20 ++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 project1_furkan.py create mode 100644 project2_furkan.py diff --git a/project1_furkan.py b/project1_furkan.py new file mode 100644 index 0000000..908d9ce --- /dev/null +++ b/project1_furkan.py @@ -0,0 +1,35 @@ +students = { + 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78 + 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76 + 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95 + 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80 + 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55 + 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90 + 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74 + 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88 + 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55 + 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82 +} +yukseknot = 0 +yuksekogrenci = "" +ads = [] +soyads= [] +alfabetik = [] +zayif = [] +for student, noot in students.items(): + mid,final,oral = noot + ort= (mid * 0.3 + final * 0.5 + oral * 0.2) + if ort > yukseknot: + yukseknot = ort + yuksekogrenci = student + if ort < 70: + zayif.append(student) +print("En yüksek notu alan öğrenci: ", yuksekogrenci) +for isim in students.keys(): + ad, soyad = isim.split() + ads.append(ad) + soyads.append(soyad) +print("Ogrenciler: ") +for isim in sorted(students.keys()): + print(isim) +print("70 altı GPA ya sahip olan ogrenciler: ",zayif) diff --git a/project2_furkan.py b/project2_furkan.py new file mode 100644 index 0000000..25c1b8f --- /dev/null +++ b/project2_furkan.py @@ -0,0 +1,20 @@ +director = [] +isim= [] +year= [] +tur= [] + + +a = input("Yönetmen Adını Giriniz: ") +b = input("Film adını Giriniz: ") +c = input("Yayın yılını giriniz: ") +d = input("Türünü giriniz: ") + +director.append(a) +isim.append(b) +year.append(c) +tur.append(d) + +print("Yönetmen Adı: ",director[0]) +print("Film Adı: ",isim[0]) +print("Yayın Yılı: ",year[0]) +print("Tür: ",tur[0]) From bab56ef0670e08863ae689b11870276919914c45 Mon Sep 17 00:00:00 2001 From: FurkanBilal Date: Fri, 25 Apr 2025 01:26:33 +0200 Subject: [PATCH 07/18] Delete project1_furkan.py --- project1_furkan.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 project1_furkan.py diff --git a/project1_furkan.py b/project1_furkan.py deleted file mode 100644 index 908d9ce..0000000 --- a/project1_furkan.py +++ /dev/null @@ -1,35 +0,0 @@ -students = { - 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78 - 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76 - 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95 - 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80 - 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55 - 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90 - 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74 - 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88 - 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55 - 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82 -} -yukseknot = 0 -yuksekogrenci = "" -ads = [] -soyads= [] -alfabetik = [] -zayif = [] -for student, noot in students.items(): - mid,final,oral = noot - ort= (mid * 0.3 + final * 0.5 + oral * 0.2) - if ort > yukseknot: - yukseknot = ort - yuksekogrenci = student - if ort < 70: - zayif.append(student) -print("En yüksek notu alan öğrenci: ", yuksekogrenci) -for isim in students.keys(): - ad, soyad = isim.split() - ads.append(ad) - soyads.append(soyad) -print("Ogrenciler: ") -for isim in sorted(students.keys()): - print(isim) -print("70 altı GPA ya sahip olan ogrenciler: ",zayif) From bb6562bde6c5e8c6defd17859e59c22a80dbd98f Mon Sep 17 00:00:00 2001 From: FurkanBilal Date: Fri, 25 Apr 2025 01:26:43 +0200 Subject: [PATCH 08/18] Delete project2_furkan.py --- project2_furkan.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 project2_furkan.py diff --git a/project2_furkan.py b/project2_furkan.py deleted file mode 100644 index 25c1b8f..0000000 --- a/project2_furkan.py +++ /dev/null @@ -1,20 +0,0 @@ -director = [] -isim= [] -year= [] -tur= [] - - -a = input("Yönetmen Adını Giriniz: ") -b = input("Film adını Giriniz: ") -c = input("Yayın yılını giriniz: ") -d = input("Türünü giriniz: ") - -director.append(a) -isim.append(b) -year.append(c) -tur.append(d) - -print("Yönetmen Adı: ",director[0]) -print("Film Adı: ",isim[0]) -print("Yayın Yılı: ",year[0]) -print("Tür: ",tur[0]) From f0133e01648a49568bfe3b42ab5081ba223ca629 Mon Sep 17 00:00:00 2001 From: FurkanBilal Date: Fri, 25 Apr 2025 01:27:13 +0200 Subject: [PATCH 09/18] Add files via upload --- .../furkan/project2_furkan.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Film_Library_Management_System/furkan/project2_furkan.py diff --git a/Film_Library_Management_System/furkan/project2_furkan.py b/Film_Library_Management_System/furkan/project2_furkan.py new file mode 100644 index 0000000..25c1b8f --- /dev/null +++ b/Film_Library_Management_System/furkan/project2_furkan.py @@ -0,0 +1,20 @@ +director = [] +isim= [] +year= [] +tur= [] + + +a = input("Yönetmen Adını Giriniz: ") +b = input("Film adını Giriniz: ") +c = input("Yayın yılını giriniz: ") +d = input("Türünü giriniz: ") + +director.append(a) +isim.append(b) +year.append(c) +tur.append(d) + +print("Yönetmen Adı: ",director[0]) +print("Film Adı: ",isim[0]) +print("Yayın Yılı: ",year[0]) +print("Tür: ",tur[0]) From 320d947edbac160943682031a8a3ab673719a760 Mon Sep 17 00:00:00 2001 From: MLAcikgoz Date: Fri, 25 Apr 2025 09:53:38 +0200 Subject: [PATCH 10/18] Update main.py --- Film_Library_Management_System/mehmet/main.py | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Film_Library_Management_System/mehmet/main.py b/Film_Library_Management_System/mehmet/main.py index e69de29..dbf7f4f 100644 --- a/Film_Library_Management_System/mehmet/main.py +++ b/Film_Library_Management_System/mehmet/main.py @@ -0,0 +1,48 @@ +# edit_delete_movie.py + +def edit_movie(movies): + name = input("Duzenlemek istediginiz filmin adini girin: ") + + if name in movies: + print("Ne degistirmek istersiniz?") + print("1. Film adi") + print("2. Yonetmen") + print("3. Yayin yili") + print("4. Tur") + choice = input("Seciminiz (1-4): ") + + if choice == "1": + new_name = input("Yeni film adini girin: ") + movies[new_name] = movies[name] # eski bilgiyi yeni adla kopyala + del movies[name] # eski filmi sil + print("Film adi guncellendi.") + elif choice == "2": + new_director = input("Yeni yonetmeni girin: ") + movies[name]["director"] = new_director + print("Yonetmen guncellendi.") + elif choice == "3": + new_year = input("Yeni yili girin: ") + movies[name]["year"] = new_year + print("Yil guncellendi.") + elif choice == "4": + new_genre = input("Yeni turu girin: ") + movies[name]["genre"] = new_genre + print("Tur guncellendi.") + else: + print("Gecersiz secim!") + else: + print("Film bulunamadi!") + + +def delete_movie(movies): + name = input("Silmek istediginiz filmin adini girin: ") + + if name in movies: + confirm = input(f"{name} filmini silmek istiyor musunuz? (e/h): ") + if confirm.lower() == "e": + del movies[name] + print("Film silindi.") + else: + print("Silme iptal edildi.") + else: + print("Film bulunamadi!") From e9f09d566df9d0f523d0efeadbd78b1eb45a8793 Mon Sep 17 00:00:00 2001 From: MLAcikgoz Date: Fri, 25 Apr 2025 09:57:18 +0200 Subject: [PATCH 11/18] Update main.py --- Customer_Management_System/mehmet/main.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Customer_Management_System/mehmet/main.py b/Customer_Management_System/mehmet/main.py index e69de29..b788793 100644 --- a/Customer_Management_System/mehmet/main.py +++ b/Customer_Management_System/mehmet/main.py @@ -0,0 +1,18 @@ +def add_customer(customers, next_id): + print("Yeni musteri ekleme islemi:") + + name = input("Musteri adi: ") + surname = input("Musteri soyadi: ") + email = input("E-posta adresi: ") + phone = input("Telefon numarasi: ") + + # Yeni musteri bilgilerini sozluge ekle + customers[next_id] = { + "name": name, + "surname": surname, + "email": email, + "phone": phone + } + + print(f"{next_id} ID numarasi ile musteri eklendi.") + return next_id + 1 # Sonraki musteri ID'si icin bir sonraki numarayi dondur From 32a27d14706774af63d8c59abaff3613c3c05619 Mon Sep 17 00:00:00 2001 From: FurkanBilal Date: Fri, 25 Apr 2025 11:07:42 +0200 Subject: [PATCH 12/18] Update add_movie.py --- Film_Library_Management_System/add_movie.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Film_Library_Management_System/add_movie.py b/Film_Library_Management_System/add_movie.py index e69de29..25c1b8f 100644 --- a/Film_Library_Management_System/add_movie.py +++ b/Film_Library_Management_System/add_movie.py @@ -0,0 +1,20 @@ +director = [] +isim= [] +year= [] +tur= [] + + +a = input("Yönetmen Adını Giriniz: ") +b = input("Film adını Giriniz: ") +c = input("Yayın yılını giriniz: ") +d = input("Türünü giriniz: ") + +director.append(a) +isim.append(b) +year.append(c) +tur.append(d) + +print("Yönetmen Adı: ",director[0]) +print("Film Adı: ",isim[0]) +print("Yayın Yılı: ",year[0]) +print("Tür: ",tur[0]) From 452526f995b2b9d2b4d6cc37490884cb462ac4f2 Mon Sep 17 00:00:00 2001 From: FurkanBilal Date: Fri, 25 Apr 2025 11:12:50 +0200 Subject: [PATCH 13/18] Update main.py --- Film_Library_Management_System/furkan/main.py | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/Film_Library_Management_System/furkan/main.py b/Film_Library_Management_System/furkan/main.py index e69de29..fea8fc3 100644 --- a/Film_Library_Management_System/furkan/main.py +++ b/Film_Library_Management_System/furkan/main.py @@ -0,0 +1,73 @@ +#yapay zeka'nın yardımıyla yapildi. + + +def film_ekle(filmler): + film = { + 'isim': input("Film adı: "), + 'yonetmen': input("Yönetmen: "), + 'yayin_yili': input("Yayın yılı: "), + 'tur': input("Tür: ") + } + filmler.append(film) + print("Film eklendi!") + +def film_duzenle(filmler): + film_adi = input("Düzenlemek istediğiniz film adı: ") + for film in filmler: + if film['isim'].lower() == film_adi.lower(): + film['isim'] = input("Yeni film adı: ") + film['yonetmen'] = input("Yeni yönetmen: ") + film['yayin_yili'] = input("Yeni yayın yılı: ") + film['tur'] = input("Yeni tür: ") + print("Film düzenlendi!") + return + print("Film bulunamadı.") + +def film_sil(filmler): + film_adi = input("Silmek istediğiniz film adı: ") + for film in filmler: + if film['isim'].lower() == film_adi.lower(): + filmler.remove(film) + print("Film silindi!") + return + print("Film bulunamadı.") + +def koleksiyonu_goruntule(filmler): + filtre = input("Tüm filmleri görüntüle (hepsi) veya tür/yıl ile filtrele (tur/yil): ").lower() + if filtre == 'hepsi': + for film in filmler: + print(film) + elif filtre == 'tur': + tur = input("Tür: ") + for film in filmler: + if film['tur'].lower() == tur.lower(): + print(film) + elif filtre == 'yil': + yil = input("Yayın yılı: ") + for film in filmler: + if film['yayin_yili'] == yil: + print(film) + else: + print("Geçersiz seçenek.") + +def main(): + filmler = [] + while True: + print("\n1. Film ekle\n2. Film düzenle\n3. Film sil\n4. Koleksiyonu görüntüle\n5. Çıkış") + secim = input("Seçiminiz: ") + if secim == '1': + film_ekle(filmler) + elif secim == '2': + film_duzenle(filmler) + elif secim == '3': + film_sil(filmler) + elif secim == '4': + koleksiyonu_goruntule(filmler) + elif secim == '5': + print("Çıkılıyor.") + break + else: + print("Geçersiz seçim.") + +if __name__ == "__main__": + main() From aa2eea9c66a876e6281e693a771b25aec2e77344 Mon Sep 17 00:00:00 2001 From: Mustafa HAYBAT Date: Fri, 25 Apr 2025 12:30:38 +0200 Subject: [PATCH 14/18] =?UTF-8?q?mustafa=20=C3=B6devleri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Customer_Management_System/mustafa/main.py | 100 ++++++++ .../mustafa/main.py | 95 ++++++++ .../mustafa/grades.ipynb | 223 ------------------ ...afa \303\266\304\237renci \303\266devi.py" | 68 ++++++ 4 files changed, 263 insertions(+), 223 deletions(-) delete mode 100644 Student_Grades_Calculation/mustafa/grades.ipynb create mode 100644 "Student_Grades_Calculation/mustafa/mustafa \303\266\304\237renci \303\266devi.py" diff --git a/Customer_Management_System/mustafa/main.py b/Customer_Management_System/mustafa/main.py index e69de29..eed5d9a 100644 --- a/Customer_Management_System/mustafa/main.py +++ b/Customer_Management_System/mustafa/main.py @@ -0,0 +1,100 @@ +musteriler = [12345, 23456, 34567] +bilgileri = [["ahmet Mümtaz", "ahmet@gmail.com", 685001122], ["Fırat Tanış", "fırat@gmail.com", 685112233], + ["Taner Birsel", "taner@gmail.com", 685223344]] +musteri_bilgi = dict(zip(musteriler, bilgileri)) + +while True: + print("Tüm Müşterileri Listelemek İçin 1,\nYeni Müşteri Eklemek İçin 2,\nMüşteri Bilgilerini Güncellemek İçin 3,\n" \ + "Müşteriyi Silmek için 4,\n Çıkış Yapmak İçin 5,\nYazınız") + secim = input("...") + + if secim == '1': + if not musteri_bilgi: + print("Henüz Herhangi Bir Müşteri Girlmemiştir.") + else: + print("Film Deporsunun Güncel Hali: ") + for id, info in musteri_bilgi.items(): + print(f"{id} ID numaralı müşterinin, İsmi: {info[0]}, Mail Adresi: {info[1]}, Telefon Numarası: {info[2]}") + + elif secim == '2': + while True: + id = int(input("Müşterinin ID'si")) + if id in musteri_bilgi: + print("Girdiğiniz ID'li müşteri zaten kayıtlı.") + else: + musteri_bilgi[id] = [ + input("Müşterinin Adı: "), + input("Müşterinin Mail Adresi: "), + input("Müşterinin Telefon Numarası: "), + ] + + while True: + enyeni_id = input("Eğer yeni bir müşteri daha girecekseniz 'E',\nAna menüye dönecekseniz 'M'\nYazınız") + if enyeni_id.lower() == 'e': + break + elif enyeni_id.lower() == 'm': + for id, bilgileri in musteri_bilgi.items(): + print(f"""Güncel Müşteri Listesi: + \n{id} ID numaralı müşterinin \nAdı: {bilgileri[0]}, + Mail Adresi: {bilgileri[1]}, + Telefon Numarası: {bilgileri[2]}""") + break + else: + print("Geçersiz bir giriş yaptınız.") + + if enyeni_id.lower() == 'm': + break + + elif secim == '3': + if not musteri_bilgi: + print("Müşteri Listsi Boştur.") + print("Düzenlemek İstediğiniz Müşterinin ID'sini Giriniz: ") + + secim3 = int(input("GÜncellenecek Müşteri ID'si: ")) + try: + secim3 = int(input("Güncellenecek Müşteri ID'si: ")) + except ValueError: + print("Geçerli bir sayısal ID giriniz.") + continue + + if secim3 in musteri_bilgi: + print(f"{secim3} ID'li müşteri bulundu.") + print(f"Mevcut Bilgileri: \nAdı: {secim3[0]}\nMaili: {secim3[1]}\nTelefonu: {secim3[2]}") + + musteri_bilgi[secim3] = [ + input("Müşterinin Adı: "), + input("Müşterinin Maili: "), + input("Müşterinin Telefonu: ") + ] + print("Müşteri Bilgileri Güncellendi.") + else: + print("Girdiğiniz ID'li müşteri listede yok.") + + elif secim == '4': + if not musteri_bilgi: + print("Müşteri Listsi Boştur.") + continue + + while True: + try: + secim4 = int(input("Silmek İstenen Müşteri ID'si: ")) + if secim4 in musteri_bilgi: + onay = input(f"{secim4} ID'li müşteriyi silmek istediğinize emin misiniz? Evet ise 'E' basınız.") + if onay.lower == 'e': + del musteri_bilgi[secim4] + print(f"{secim4} ID'li müşteri bilgileri listeden silindi.") + else: + print("Silme işlemi iptal edildi.") + else: + print(f"{secim4} ID'li müşteri listede yok.") + break + except ValueError: + print("Geçerli bir sayısal ID giriniz.") + + elif secim == '5': + print("Çıkılıyor...") + break + + else: + print("Hatalı Giriş Yaptınmız, 1-5 arasında bir değer giriniz.") + diff --git a/Film_Library_Management_System/mustafa/main.py b/Film_Library_Management_System/mustafa/main.py index e69de29..528a4a1 100644 --- a/Film_Library_Management_System/mustafa/main.py +++ b/Film_Library_Management_System/mustafa/main.py @@ -0,0 +1,95 @@ +film_deposu = { + 'Forrest Gump': [1994, 'Dram', 'Robert Zemeckis'], + 'Terminator 2': [1991, 'Aksiyon', 'James Cameron'], + 'İnception': [2010, 'Bilim Kurgu', 'Christopher Nolan'], + 'Piyanist': [2002, 'Trajedi', 'Roman Polnaski'], + 'Prestij': [2006, 'Dram', 'Christopher Nolan'] +} + +while True: + print("Film listelerini görüntülemek için 1,\nFİlm eklemek için 2, \nFilm düzenlemek için 3, \nFilm silmek için 4 yazınız.") + secim1 = input("...") + + if secim1 == '1': + if not film_deposu: + print("Henüz film eklenmemiştir.") + else: + print("Film Deposunun Güncel Hali: ") + for film, bilgiler in film_deposu.items(): + print(f"- {film}: Yapım Yılı: {bilgiler[0]}, Tür: {bilgiler[1]}, Yönetmen: {bilgiler[2]}") + + + elif secim1 == '2': + while True: + film_adi = input("Filmin Adı: ") + film_deposu[film_adi] = [ + input("Yapım Yılı: "), + input("Türü: "), + input("Yönetmeni: ") + ] + + while True: + yeni_film = input("Yeni bir film daha girecekseniz 'E', \nMenüde devam etmek için ise 'M' harfine basınız: ") + if yeni_film.lower() == 'e': + break + elif yeni_film.lower() == 'm': + print("Film Deposunun Güncel Hali:") + for film, bilgiler in film_deposu.items(): + print(f"- {film}: Yapım Yılı: {bilgiler[0]}, Tür: {bilgiler[1]}, Yönetmen: {bilgiler[2]}") + break + else: + print("Geçersiz bir seçim yaptınız.") + + if yeni_film.lower() == 'm': + break + + elif secim1 == '3': + if not film_deposu: + print("Henüz film eklenmemiştir.") + continue + print("Düzenlemek istediğiniz filmi seçiniz: ") + film_listesi = list(film_deposu.keys()) + for i, film in enumerate(film_listesi, 1): + print(f"{i}. {film}") + + try: + secim2 = int(input("Film Numarasını Giriniz: ")) - 1 + film_adi = film_listesi[secim2] + + print("Mevcut Bilgiler: ") + print("1- Yapım Yılı: ", film_deposu[film_adi][0]) + print("2- Türü: ", film_deposu[film_adi][1]) + print("3- Yönetmeni: ", film_deposu[film_adi][2]) + + degisiklik = input("Hangi bilgiyi düzenlemek istiyorsunuz? 1, 2 veya 3 Yazınız: ") + + if degisiklik == '1': + film_deposu[film_adi][0] = input("Yeni yapım yılı: ") + elif degisiklik == '2': + film_deposu[film_adi][1] = input("Yeni Tür: ") + elif degisiklik == '3': + film_deposu[film_adi][2] = input("Yeni Yönetmen: ") + else: + print("Geçersiz seçim.") + except (IndexError, ValueError): + print("Geçersiz Film Numarası") + + elif secim1 == '4': + if not film_deposu: + print("Henüz film eklenmemiştir.") + continue + print("Silmek istediğiniz filmi seçiniz: ") + film_listesi = list(film_deposu.keys()) + for i, film in enumerate(film_listesi, 1): + print(f"{i}, {film}") + + try: + secim3 = int(input("Film Numarasını Giriniz: ")) - 1 + film_adi = film_listesi[secim3] + del film_deposu[film_adi] + print(f"{film_adi} filmi silindi.") + except (IndexError, ValueError): + print("Geçersiz Film Numarası") + + + \ No newline at end of file diff --git a/Student_Grades_Calculation/mustafa/grades.ipynb b/Student_Grades_Calculation/mustafa/grades.ipynb deleted file mode 100644 index 9b2a534..0000000 --- a/Student_Grades_Calculation/mustafa/grades.ipynb +++ /dev/null @@ -1,223 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Question1: Student Grades Processing\n", - "You need to write a Python program to process a student's grades. The program needs to perform the following functions:\n", - "\n", - "Store information and notes for 10 students using a dictionary. Let each student have their name, surname and grades (Midterm, Final and Oral grades). For example:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "students = {\n", - " 'Ahmet Yılmaz': [85, 90, 78], # Midterm: 85, Final: 90, Oral: 78\n", - " 'Mehmet Demir': [92, 88, 76], # Midterm: 92, Final: 88, Oral: 76\n", - " 'Ayşe Kaya': [78, 89, 95], # Midterm: 78, Final: 89, Oral: 95\n", - " 'Zeynep Çelik': [65, 70, 80], # Midterm: 65, Final: 70, Oral: 80\n", - " 'Ali Kara': [50, 60, 55], # Midterm: 50, Final: 60, Oral: 55\n", - " 'Fatma Yıldız': [88, 85, 90], # Midterm: 88, Final: 85, Oral: 90\n", - " 'Murat Aydın': [72, 68, 74], # Midterm: 72, Final: 68, Oral: 74\n", - " 'Elif Aksoy': [95, 90, 88], # Midterm: 95, Final: 90, Oral: 88\n", - " 'Hakan Öztürk': [45, 50, 55], # Midterm: 45, Final: 50, Oral: 55\n", - " 'Canan Taş': [80, 75, 82] # Midterm: 80, Final: 75, Oral: 82\n", - "}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "1-Calculate each student's GPA and add it to the dictionary." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'Ahmet Yılmaz': [85, 90, 78, 85],\n", - " 'Mehmet Demir': [92, 88, 76, 86],\n", - " 'Ayşe Kaya': [78, 89, 95, 88],\n", - " 'Zeynep Çelik': [65, 70, 80, 72],\n", - " 'Ali Kara': [50, 60, 55, 55],\n", - " 'Fatma Yıldız': [88, 85, 90, 88],\n", - " 'Murat Aydın': [72, 68, 74, 72],\n", - " 'Elif Aksoy': [95, 90, 88, 91],\n", - " 'Hakan Öztürk': [45, 50, 55, 50],\n", - " 'Canan Taş': [80, 75, 82, 79]}" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "import math\n", - "import numpy as np\n", - "\n", - "for grade in students.items():\n", - " grade[1].append(math.ceil(np.mean(grade[1])))\n", - " \n", - "students" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "2-Find the student with the highest GPA and print it on the screen." - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " En yuksek GPA'ya sahip ogrenciler: Elif Aksoy, GPA : 91\n" - ] - } - ], - "source": [ - "gpa = max(grade[1][3] for grade in students.items())\n", - "student_names = [grade[0] for grade in students.items() if grade[1][3] == gpa]\n", - "\n", - "print(f\" En yuksek GPA'ya sahip ogrenciler: {\", \".join(student_names)}, GPA : {gpa}\" )" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "3- Separate each student's name from their surname and store them in a separate tuple and add them to a list." - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "('Ahmet', 'Mehmet', 'Ayşe', 'Zeynep', 'Ali', 'Fatma', 'Murat', 'Elif', 'Hakan', 'Canan') ('Yılmaz', 'Demir', 'Kaya', 'Çelik', 'Kara', 'Yıldız', 'Aydın', 'Aksoy', 'Öztürk', 'Taş')\n" - ] - } - ], - "source": [ - "def get_names(students):\n", - " names = tuple(grade[0].split()[0] for grade in students.items())\n", - " surnames = tuple(grade[0].split()[1] for grade in students.items())\n", - " return names, surnames\n", - "\n", - "names, surnames = get_names(students)\n", - "print(names, surnames)" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "slideshow": { - "slide_type": "notes" - } - }, - "source": [ - "4-Sort the names in alphabetical order and print the sorted list on the screen." - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Ahmet\n", - "Ali\n", - "Ayşe\n", - "Canan\n", - "Elif\n", - "Fatma\n", - "Hakan\n", - "Mehmet\n", - "Murat\n", - "Zeynep\n" - ] - } - ], - "source": [ - "for name in sorted(names):\n", - " print(name)" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "slideshow": { - "slide_type": "notes" - } - }, - "source": [ - "5-Keep students with a GPA below 70 in a cluster (set)." - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'Hakan Öztürk', 'Ali Kara'}\n" - ] - } - ], - "source": [ - "students_below70 = set(student[0] for student in students.items() if student[1][-1] < 70)\n", - "\n", - "print(students_below70)" - ] - } - ], - "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.13.2" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git "a/Student_Grades_Calculation/mustafa/mustafa \303\266\304\237renci \303\266devi.py" "b/Student_Grades_Calculation/mustafa/mustafa \303\266\304\237renci \303\266devi.py" new file mode 100644 index 0000000..2c1a718 --- /dev/null +++ "b/Student_Grades_Calculation/mustafa/mustafa \303\266\304\237renci \303\266devi.py" @@ -0,0 +1,68 @@ +ogrenciler = { + 'Ahmet YILMAZ': [85, 90, 78], + 'Mehmet DEMİR': [92, 88, 76], + 'Ayşe KAYA': [78, 89, 95], + 'Zeynep ÇELİK': [65, 70, 80], + 'Ali KARA': [50, 60, 55], + 'Fatma YILDIZ': [88, 85, 90], + 'Murat AYDIN': [72, 68, 74], + 'Elif AKSOY': [95, 90, 88], + 'Hakan ÖZTÜRK': [45, 50, 55], + 'Canan TAŞ': [80, 75, 82] +} + +#Her öğrencinin ortalaması notlarının yanına eklendi +for isim, notlar in ogrenciler.items(): + ortalama = round(sum(notlar) / len(notlar),2) + ogrenciler[isim] = { + 'notlar': notlar, + 'ortalama': ortalama + } + +#En yüksek ortalamayı bulma +ogrenci_listesi = list(ogrenciler.items()) +en_yuksek_ogrenci = ogrenci_listesi[0] +for ogrenci in ogrenci_listesi[1:]: + if ogrenci[1]['ortalama'] > en_yuksek_ogrenci[1]['ortalama']: + en_yuksek_ogrenci = ogrenci + +en_yuksek_isim = en_yuksek_ogrenci[0] +en_yuksek_ortalama = en_yuksek_ogrenci[1]['ortalama'] +print(f"En yüksek ortalaması olan öğrenci: {en_yuksek_isim}") +print(f"En yüksek ortalama: {en_yuksek_ortalama}") + +#Her öğrencinin adını soyadından ayırıp ayrı bir tuple saklayıp bir listeye ekleyin +ad_soyad_listesi = [] +for isim in ogrenciler.keys(): + ad, soyad = isim.split() + ad_soyad_listesi.append((ad, soyad)) +print(ad_soyad_listesi) + +#İsimleri alfabetik sıraya göre sıralayın ve sıralanmış listeyi ekrana yazdırın. +alfabetik_sira = sorted(ogrenciler.keys()) +print(alfabetik_sira) + +#GNO'su 70'in altında olan öğrencileri bir kümede (kümede) tutun. +ogrenciler = { + 'Ahmet YILMAZ': [85, 90, 78], + 'Mehmet DEMİR': [92, 88, 76], + 'Ayşe KAYA': [78, 89, 95], + 'Zeynep ÇELİK': [65, 70, 80], + 'Ali KARA': [50, 60, 55], + 'Fatma YILDIZ': [88, 85, 90], + 'Murat AYDIN': [72, 68, 74], + 'Elif AKSOY': [95, 90, 88], + 'Hakan ÖZTÜRK': [45, 50, 55], + 'Canan TAŞ': [80, 75, 82] +} + +ortalama = {} +for isim, notlar in ogrenciler.items(): + ort = sum(notlar)/len(notlar) + ortalama[isim] = round(ort, 2) + +alti_70 = set() +for isim, ort in ortalama.items(): + if ort < 70: + alti_70.add(isim) +print("70'in altındaki öğrenciler kümesi: ", alti_70) From 0f4b80fc2c092e08710ddcc1f9809141712fe5c3 Mon Sep 17 00:00:00 2001 From: Mustafa HAYBAT Date: Fri, 25 Apr 2025 12:59:47 +0200 Subject: [PATCH 15/18] =?UTF-8?q?=C3=B6dev=20son=20kontrol=20ve=20de=C4=9F?= =?UTF-8?q?i=C5=9Fikler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Customer_Management_System/mustafa/main.py | 11 +++++------ Film_Library_Management_System/mustafa/main.py | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Customer_Management_System/mustafa/main.py b/Customer_Management_System/mustafa/main.py index eed5d9a..13d9cda 100644 --- a/Customer_Management_System/mustafa/main.py +++ b/Customer_Management_System/mustafa/main.py @@ -1,6 +1,6 @@ musteriler = [12345, 23456, 34567] -bilgileri = [["ahmet Mümtaz", "ahmet@gmail.com", 685001122], ["Fırat Tanış", "fırat@gmail.com", 685112233], - ["Taner Birsel", "taner@gmail.com", 685223344]] +bilgileri = [["ahmet Mümtaz", "ahmet@gmail.com", "0685001122"], ["Fırat Tanış", "fırat@gmail.com", "0685112233"], + ["Taner Birsel", "taner@gmail.com", "0685223344"]] musteri_bilgi = dict(zip(musteriler, bilgileri)) while True: @@ -12,7 +12,7 @@ if not musteri_bilgi: print("Henüz Herhangi Bir Müşteri Girlmemiştir.") else: - print("Film Deporsunun Güncel Hali: ") + print("Film Deposunun Güncel Hali: ") for id, info in musteri_bilgi.items(): print(f"{id} ID numaralı müşterinin, İsmi: {info[0]}, Mail Adresi: {info[1]}, Telefon Numarası: {info[2]}") @@ -48,9 +48,8 @@ elif secim == '3': if not musteri_bilgi: print("Müşteri Listsi Boştur.") - print("Düzenlemek İstediğiniz Müşterinin ID'sini Giriniz: ") + continue - secim3 = int(input("GÜncellenecek Müşteri ID'si: ")) try: secim3 = int(input("Güncellenecek Müşteri ID'si: ")) except ValueError: @@ -80,7 +79,7 @@ secim4 = int(input("Silmek İstenen Müşteri ID'si: ")) if secim4 in musteri_bilgi: onay = input(f"{secim4} ID'li müşteriyi silmek istediğinize emin misiniz? Evet ise 'E' basınız.") - if onay.lower == 'e': + if onay.lower() == 'e': del musteri_bilgi[secim4] print(f"{secim4} ID'li müşteri bilgileri listeden silindi.") else: diff --git a/Film_Library_Management_System/mustafa/main.py b/Film_Library_Management_System/mustafa/main.py index 528a4a1..ab327d7 100644 --- a/Film_Library_Management_System/mustafa/main.py +++ b/Film_Library_Management_System/mustafa/main.py @@ -81,7 +81,7 @@ print("Silmek istediğiniz filmi seçiniz: ") film_listesi = list(film_deposu.keys()) for i, film in enumerate(film_listesi, 1): - print(f"{i}, {film}") + print(f"{i}- {film}") try: secim3 = int(input("Film Numarasını Giriniz: ")) - 1 From 9ce571f78da390614d51dd524a8d9ac43382be58 Mon Sep 17 00:00:00 2001 From: Kursad <122346253+KursaDSc@users.noreply.github.com> Date: Fri, 25 Apr 2025 20:00:33 +0200 Subject: [PATCH 16/18] Update movies.json --- Film_Library_Management_System/kursad/movies.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Film_Library_Management_System/kursad/movies.json b/Film_Library_Management_System/kursad/movies.json index f044922..66fca8b 100644 --- a/Film_Library_Management_System/kursad/movies.json +++ b/Film_Library_Management_System/kursad/movies.json @@ -11,12 +11,6 @@ "genre": "Crime", "lead_actor": "Marlon Brando" }, - "Forrest Gump": { - "director": "Robert Zemeckis", - "release_year": 1994, - "genre": "Drama", - "lead_actor": "Tom Hanks" - }, "Inception": { "director": "Christopher Nolan", "release_year": 2010, From 627146f5eba957391f9ce326569818c34bd1f26c Mon Sep 17 00:00:00 2001 From: Kursad <122346253+KursaDSc@users.noreply.github.com> Date: Fri, 25 Apr 2025 20:03:15 +0200 Subject: [PATCH 17/18] son durum --- Customer_Management_System/add_customer.py | 0 Customer_Management_System/delete_customer.py | 0 Customer_Management_System/list_customers.py | 0 Customer_Management_System/main.py | 0 Customer_Management_System/update_customer.py | 0 .../edit_delete_movie.py | 0 .../file_operations.py | 0 Film_Library_Management_System/kursad/main.py | 29 +++++++++------- Film_Library_Management_System/main.py | 0 .../view_collection.py | 0 README.md | 34 ------------------- 11 files changed, 16 insertions(+), 47 deletions(-) delete mode 100644 Customer_Management_System/add_customer.py delete mode 100644 Customer_Management_System/delete_customer.py delete mode 100644 Customer_Management_System/list_customers.py delete mode 100644 Customer_Management_System/main.py delete mode 100644 Customer_Management_System/update_customer.py delete mode 100644 Film_Library_Management_System/edit_delete_movie.py delete mode 100644 Film_Library_Management_System/file_operations.py delete mode 100644 Film_Library_Management_System/main.py delete mode 100644 Film_Library_Management_System/view_collection.py delete mode 100644 README.md diff --git a/Customer_Management_System/add_customer.py b/Customer_Management_System/add_customer.py deleted file mode 100644 index e69de29..0000000 diff --git a/Customer_Management_System/delete_customer.py b/Customer_Management_System/delete_customer.py deleted file mode 100644 index e69de29..0000000 diff --git a/Customer_Management_System/list_customers.py b/Customer_Management_System/list_customers.py deleted file mode 100644 index e69de29..0000000 diff --git a/Customer_Management_System/main.py b/Customer_Management_System/main.py deleted file mode 100644 index e69de29..0000000 diff --git a/Customer_Management_System/update_customer.py b/Customer_Management_System/update_customer.py deleted file mode 100644 index e69de29..0000000 diff --git a/Film_Library_Management_System/edit_delete_movie.py b/Film_Library_Management_System/edit_delete_movie.py deleted file mode 100644 index e69de29..0000000 diff --git a/Film_Library_Management_System/file_operations.py b/Film_Library_Management_System/file_operations.py deleted file mode 100644 index e69de29..0000000 diff --git a/Film_Library_Management_System/kursad/main.py b/Film_Library_Management_System/kursad/main.py index a6d27e2..a081f87 100644 --- a/Film_Library_Management_System/kursad/main.py +++ b/Film_Library_Management_System/kursad/main.py @@ -1,6 +1,5 @@ import json import os -import keyboard clear_screen = lambda: os.system('cls' if os.name == 'nt' else 'clear') @@ -16,6 +15,7 @@ def update_movies_json(movies_dict, filename=file_path): with open(filename, 'w', encoding='utf-8') as file: json.dump(movies_dict, file, indent=4, ensure_ascii=False) +# Belirlenen bir aralıktaki sayısal girişi gecerli olarak alır. def get_input(range, message="Lütfen bir işlem numarası giriniz:"): while True: try: @@ -25,6 +25,7 @@ def get_input(range, message="Lütfen bir işlem numarası giriniz:"): except ValueError: print("lütfen gecerli bir deger giriniz") +# Menu başlıgını yazdırır. def menu_header(menu_name): clear_screen() global menu_width @@ -33,6 +34,7 @@ def menu_header(menu_name): print(f"\033[1;33m"+ menu_name.center(menu_width)+f"\033[0m") print(menu_width*'-') +# Ana menuyu yazdırır. def show_main_menu(): menu_name = "Movie Library" menu_header(menu_name) @@ -48,6 +50,7 @@ def show_main_menu(): clear_screen() return selection +# Film listesinden sıra numarası girilen filmi silme, dğzenleme islemleri icin secerek filmin adını döndürür. def select_movie(message): movie_list = [] @@ -64,7 +67,7 @@ def select_movie(message): else: return None - +# Düzenlenecek filmin detaylarını gösterir. def show_movie_details(movie): menu_name = movie + " - Movie Details" menu_header(menu_name) @@ -77,6 +80,7 @@ def show_movie_details(movie): print(menu_width*'-') +# Seçilen filmin düzenlenmesinmi sağlar. def change_details(movie): print(f"\n\nEditing movie: {movie}") info = movies[movie] @@ -101,8 +105,17 @@ def change_details(movie): print("Movie edited successfully!") input("Press Enter to continue...") +def edit_movie(): + menu_name = "Edit Movie" + menu_header(menu_name) + message = "Düzenlemek istediğiniz filmin numarasını giriniz, vazgeçmek için 0'a basınsınız :" + movie = select_movie(message) + + if movie != None: + show_movie_details(movie) + change_details(movie) - + # Seçilen filmin silinnmesinmi sağlar. def delete_movie(): menu_name = "Delete Movie" menu_header(menu_name) @@ -116,16 +129,6 @@ def delete_movie(): print("Movie deleted successfully!") input("Press Enter to continue...") -def edit_movie(): - menu_name = "Edit Movie" - menu_header(menu_name) - message = "Düzenlemek istediğiniz filmin numarasını giriniz, vazgeçmek için 0'a basınsınız :" - movie = select_movie(message) - - if movie != None: - show_movie_details(movie) - change_details(movie) - def view_movies(): menu_name = "View Movies" menu_header(menu_name) diff --git a/Film_Library_Management_System/main.py b/Film_Library_Management_System/main.py deleted file mode 100644 index e69de29..0000000 diff --git a/Film_Library_Management_System/view_collection.py b/Film_Library_Management_System/view_collection.py deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md deleted file mode 100644 index 96e8a19..0000000 --- a/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Python_Modul_Week_2 – Team Plan - -## Team Members: -- Kürşad -- Ali -- Furkan -- Mehmet Lütfi -- Mustafa - ---- - -## Project 2: Film Library Management System - -### Görev Dağılımı: -- **Furkan**: add_movie.py – Film ekleme fonksiyonunu geliştirir. -- **Mehmet Lütfi**: edit_delete_movie.py – Film düzenleme ve silme fonksiyonları. -- **Mustafa**: view_collection.py – Film listesini görüntüleme ve filtreleme işlemleri. -- **Ali**: file_operations.py – Veriyi dosyaya kaydetme/yükleme işlemleri. -- **Kürşad**: main.py – Tüm modülleri entegre eder, menüyü yönetir. - ---- - -## Project 3: Customer Management System - -### Görev Dağılımı: -- **Mehmet Lütfi**: add_customer.py – Müşteri ekleme işlemleri. -- **Mustafa**: update_customer.py – Müşteri bilgilerini güncelleme. -- **Ali**: delete_customer.py – Müşteri silme işlemi. -- **Furkan**: list_customers.py – Müşteri listesini gösterme. -- **Kürşad**: main.py – Menü ve kullanıcı etkileşimini sağlar. - ---- - -Her bir modül işlevsel olarak bağımsızdır. Takım üyeleri geliştirdikleri modülü `main.py` dosyası ile entegre ederek test edeceklerdir. Testler tamamlandıktan sonra `main.py` dosyası ile birlikte çözüm GitHub’a push edilecektir. From 32101a83b1af51e3d526ea3bb3b6c83c2d3a5dc5 Mon Sep 17 00:00:00 2001 From: Kursad <122346253+KursaDSc@users.noreply.github.com> Date: Fri, 25 Apr 2025 20:05:11 +0200 Subject: [PATCH 18/18] Readme --- Odev.md => Readme.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Odev.md => Readme.md (100%) diff --git a/Odev.md b/Readme.md similarity index 100% rename from Odev.md rename to Readme.md