From 7bb3624d3c47b6ce6bfb721a151248f9d7981586 Mon Sep 17 00:00:00 2001 From: infbuilds Date: Thu, 12 Feb 2026 23:18:20 +0300 Subject: [PATCH 1/2] Create str-repr.py basic repr --- Python/str-repr.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Python/str-repr.py diff --git a/Python/str-repr.py b/Python/str-repr.py new file mode 100644 index 0000000..db1f442 --- /dev/null +++ b/Python/str-repr.py @@ -0,0 +1,17 @@ +class footballer: + def __init__(self, name, surname, age): + self.name = name + self.surname = surname + self.age = age + + def __str__(self): + return f"Footballer: {self.name} {self.surname} Age: {self.age}" + def __repr__(self): + return f'Footballer"{self.name}"," Suurname: " {self.surname}", Age: {self.age})' + +footballer1 = footballer("Lionel", "Messi", 36) + +print(footballer1) +print(repr(footballer1)) + + From 934d2294af821aaddee8c08c2d8b34a591bf3a3d Mon Sep 17 00:00:00 2001 From: infbuilds Date: Thu, 12 Feb 2026 23:19:54 +0300 Subject: [PATCH 2/2] Crash-Proof_Calculator.py to python/Crash-Proof_Calculator.py --- Crash-Proof_Calculator.py => python/Crash-Proof_Calculator.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Crash-Proof_Calculator.py => python/Crash-Proof_Calculator.py (100%) diff --git a/Crash-Proof_Calculator.py b/python/Crash-Proof_Calculator.py similarity index 100% rename from Crash-Proof_Calculator.py rename to python/Crash-Proof_Calculator.py