<filename>week_5/while_loop/while_list.py<gh_stars>0

# Wypisywanie listy ulubionych sportów
# favourite_sports = ["bieganie", "pływanie", "jazda na rowerze", "triathlon"]
# sport_index = 0
# while sport_index < len(favourite_sports):
#     print(favourite_sports[sport_index])
#     sport_index += 1

# Wypisywanie co drugiego sportu
# favourite_sports = ["bieganie", "pływanie", "jazda na rowerze", "triathlon"]
# sport_index = 0
# while sport_index < len(favourite_sports):
#     if sport_index % 2 == 0:
#         print(favourite_sports[sport_index])
#     sport_index += 1


# Sumowanie liczb
numbers = [1, 3, 510, 123, 24]
numbers_sum = 0
number_index = 0
while number_index < len(numbers):
    numbers_sum += numbers[number_index]
    number_index += 1
print(f"Suma: {numbers_sum}")


<filename>week_5/while_loop/while_list.py<gh_stars>0

# Wypisywanie listy ulubionych sportów
# favourite_sports = ["bieganie", "pływanie", "jazda na rowerze", "triathlon"]
# sport_index = 0
# while sport_index < len(favourite_sports):
#     print(favourite_sports[sport_index])
#     sport_index += 1

# Wypisywanie co drugiego sportu
# favourite_sports = ["bieganie", "pływanie", "jazda na rowerze", "triathlon"]
# sport_index = 0
# while sport_index < len(favourite_sports):
#     if sport_index % 2 == 0:
#         print(favourite_sports[sport_index])
#     sport_index += 1


# Sumowanie liczb
numbers = [1, 3, 510, 123, 24]
numbers_sum = 0
number_index = 0
while number_index < len(numbers):
    numbers_sum += numbers[number_index]
    number_index += 1
print(f"Suma: {numbers_sum}")


# Wypisywanie listy ulubionych sportów # favourite_sports = ["bieganie", "pływanie", "jazda na rowerze", "triathlon"] # sport_index = 0 # while sport_index < len(favourite_sports): #     print(favourite_sports[sport_index]) #     sport_index += 1 # Wypisywanie co drugiego sportu # favourite_sports = ["bieganie", "pływanie", "jazda na rowerze", "triathlon"] # sport_index = 0 # while sport_index < len(favourite_sports): #     if sport_index % 2 == 0: #         print(favourite_sports[sport_index]) #     sport_index += 1 # Sumowanie liczb