Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. liczba = int(input("Podaj liczbę: "))
  2. tab = [0]*20
  3. i = 0
  4.  
  5. while liczba >= 0:
  6. if liczba % 2 == 0:
  7. tab[i] = liczba
  8. i += 1
  9. else:
  10. tab.append(liczba)
  11. liczba = int(input("Podaj liczbę: "))
  12.  
  13.  
  14. j = 19
  15. while tab[j] == 0:
  16. print(j)
  17. print(tab)
  18. tab.pop(tab[j])
  19. j -= 1
  20.  
  21. print(tab)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement