Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- liczba = int(input("Podaj liczbę: "))
- tab = [0]*20
- i = 0
- while liczba >= 0:
- if liczba % 2 == 0:
- tab[i] = liczba
- i += 1
- else:
- tab.append(liczba)
- liczba = int(input("Podaj liczbę: "))
- j = 19
- while tab[j] == 0:
- print(j)
- print(tab)
- tab.pop(tab[j])
- j -= 1
- print(tab)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement