From 4274f329eca765a31e87e01815a58875ffdd22da Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:26:59 +0000 Subject: [PATCH] style: format code with Autopep8, Black, isort, Ruff Formatter and Yapf This commit fixes the style issues introduced in 92350f6 according to the output from Autopep8, Black, isort, Ruff Formatter and Yapf. Details: None --- assignment.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/assignment.py b/assignment.py index ef03336..2656ec4 100644 --- a/assignment.py +++ b/assignment.py @@ -6,6 +6,7 @@ def add_student(students): students[roll] = (name, age, subject) print("Student added successfully!") + def update_student(students): roll = int(input("Enter roll number of the student to update: ")) if roll in students: @@ -17,6 +18,7 @@ def update_student(students): else: print("Student not found!") + def delete_student(students): roll = int(input("Enter roll number of the student to delete: ")) if roll in students: @@ -25,18 +27,25 @@ def delete_student(students): else: print("Student not found!") + def search_student(students): roll = int(input("Enter roll number of the student to search: ")) if roll in students: print("Student found!") - print(f"Name: {students[roll][0]}, Age: {students[roll][1]}, Subject: {students[roll][2]}") + print( + f"Name: {students[roll][0]}, Age: {students[roll][1]}, Subject: {students[roll][2]}" + ) else: print("Student not found!") + def print_students(students): print("List of students:") for roll in students: - print(f"Roll number: {roll}, Name: {students[roll][0]}, Age: {students[roll][1]}, Subject: {students[roll][2]}") + print( + f"Roll number: {roll}, Name: {students[roll][0]}, Age: {students[roll][1]}, Subject: {students[roll][2]}" + ) + if __name__ == "__main__": students = {}