Commit a40c9d7f by Patryk Czarnik

geometria - początek

parent 8100966e
def pole_kwadratu(a):
return a*a
def obwod_kwadratu(a):
return 4*a
def pole_prostokata(a, b):
return a*b
def obwod_prostokata(a, b):
return 2*a + 2*b
# Testowe wywołania funkcji:
print('pole kwadratu 5:', pole_kwadratu(5))
print('pole kwadratu 7.5:', pole_kwadratu(7.5))
print('pole prostokąta 3×4:', pole_prostokata(3, 4))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment