Commit e75dfc9c by Patryk Czarnik

dwupoziomowy if

parent a594f0df
......@@ -36,3 +36,18 @@ else:
print()
# elifów może być więcej
# ify (tak jak wszystkie inne konstrukcje Pythona) można zagnieżdżać
if x < 50:
if y < 50:
print('Obie liczby, x i y, są mniejsze niż 50')
else:
print('x < 50 , y >= 50')
else:
if y < 50:
print('x >= 50 , y < 50')
else:
print('obie liczby są >= 50')
# Generalnie nie należy przesadzać z poziomami zagnieżdżenia - im więcej, tym mniej czytelny program.
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