initial commit
This commit is contained in:
14
Python/OOP3/task5.py
Normal file
14
Python/OOP3/task5.py
Normal file
@ -0,0 +1,14 @@
|
||||
from typing import Self
|
||||
|
||||
|
||||
class CrazyNumber:
|
||||
def __init__(self, number):
|
||||
self.number = number
|
||||
|
||||
def __sub__(self, other: Self) -> float:
|
||||
return self.number // other.number
|
||||
|
||||
|
||||
n1 = CrazyNumber(1243)
|
||||
n2 = CrazyNumber(2)
|
||||
print(n1 - n2)
|
Reference in New Issue
Block a user