Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. import random
  2.  
  3.  
  4.  
  5. def swiat(n,m,k,TablicaSwiatel):
  6. a=[0]*n
  7. a[0]=+m
  8. licznik =05
  9. k=0
  10. TablicaSwiatel=[0]*n
  11.  
  12. while a[n-1] is not m: #is not m
  13. licznik=+1
  14. """
  15. while k is not 3:
  16. """
  17.  
  18. for j in range(len(b)):
  19. if b[j] is 1:
  20. b[j]=0
  21. else:
  22. b[j]=1
  23.  
  24. for i in range(len(a)-1):
  25. if a[i] is not 0:
  26. if b[i+1] is 0:
  27. a[i+1]+=1
  28. a[i]-=1
  29. print('while')
  30. print('exit')
  31. return a,b
  32.  
  33. n = input('Prosze podac wielkosc swiata')
  34. m = input('Prosze podac ilosc foobarian')
  35. k = input('Prosze podac ilosc swiatel ktore maja znajdowac sie w swiecie')
  36.  
  37. for i in range(k):
  38. pozycja = input('Pozycja na ktorej ma znajdowac sie swiatlo')
  39. kolor = raw_input('Kolor swiatla 0=zielone 1=czerwone')
  40. TablicaSwiatel[pozycja] = kolor
  41.  
  42. print swiat(n,m,w,TablicaSwiatel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement