Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # Input
  2. cars = input("Cars: ")
  3. c = cars.split()
  4.  
  5. # Counter Values (r counts red, b counts blue)
  6. r = 0
  7. b = 0
  8.  
  9. # Red Values
  10. for i in c:
  11. if 'red' in c:
  12. r = + 1
  13.  
  14. # Blue Values
  15. for i in c:
  16. if 'blue' in c:
  17. b = + 1
  18.  
  19. # Printers
  20. print("blue: ", b)
  21. print("red: ", r)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement