0 like 0 dislike
1 view
in Python by anonymous Bilge (165k points)
reshown by anonymous
python kurulum, komut satırı, ide ve temel komutlar

1 Answer

0 like 0 dislike
by anonymous Bilge (165k points)

for-loops

for x in range(4):  # 0'dan 3'e kadar 0,1,2,3
    print(x)
for x in range(1, 5):  # 1,2,3,4
    print(x)
for x in range(2, 7, 2): # 3'ten 8'e kadar 2 artarak 2,4,6
    print(x)
for x in range(10):  # 1,3,5,7,9
    if x % 2 == 0:
        continue
    print(x)
for i in range(1, 10):  # 1,2,3,4
    if (i % 5 == 0):
        break
    print(i)
...