Commit d23f7e35 by Patryk Czarnik

geometria - if __name__

parent 55e5ead2
......@@ -13,7 +13,10 @@ def pole_prostokata(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))
if __name__ == '__main__':
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))
else:
print('Nie wykonuję testowych instrukcji, gdyż __name__ ==', __name__)
\ No newline at end of file
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