I need help with this for my design class..
This is the question..
You are watching cars go past you while you wait to cross the road and want to see whether red or blue is a more popular colour for cars. Write a program that reads in a string of the colour of each car that drives past, and then prints out the number of red cars and the number of blue cars.
and the output has to be like this
Cars: silver red white white blue white black green yellow silver white
red: 1
blue: 1
This is what I have done so far.
line = input ("Cars: ")
words = 'red blue'.split()
word = len(words)
while line != 'red':
poop = +1
while line != 'blue':
wah = +1
print("red:",poop)
print("blue:",wah)
Can someone please help me?