Files
pythonkurs/teil28/static.py
2024-10-25 14:03:27 +02:00

21 lines
265 B
Python

# Datei static.py
class Math():
@staticmethod
def add(x,y):
return x+y
@staticmethod
def sub(x,y):
return x-y
@staticmethod
def mul(x,y):
return x*y
print(f'Add: {Math.add(3,2)}')
print(f'Sub: {Math.sub(3,2)}')
print(f'Mul: {Math.mul(3,2)}')