You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
523 B
22 lines
523 B
x = 10
|
|
y = 15
|
|
|
|
#AltGR + ,|. = <|>
|
|
if x==y:
|
|
print("X je stejný s Y")
|
|
elif x < y:
|
|
print("X je menší než Y")
|
|
else:
|
|
print("X je větší než Y")
|
|
|
|
#for loop -> cyklus který potřebuje <něco> s čím bude pracovat
|
|
for x in range(10):
|
|
print(x)
|
|
|
|
#while loop -> cyklus který se opakuje dokud <podmínka> je true
|
|
i = 1
|
|
while i<10:
|
|
print(i)
|
|
i+=1
|
|
|
|
#"While true:" se používa hlavně s ošetřením nenekonečného loopu(while true cyklus musí mít možnost ukončení cyklu->break nejčastěji)
|