Associate two lists, a list with car name and another list of colors and each one containing n elements:
listaCarros = ["gol","uno","corsa","palio","idea"]
listaCores = ["branco","verde","preto","cinza","azul"]
with the output in this format:
"Goal is white"
I did the following:
n=0
while n <= 5:
print("\nO", end=' ')
print(listaCarros[n],end=' é ')
print(listaCores[n])
n = n + 1
It worked, but this message appeared:
Traceback (most recent call last): "file path" line 286, in print (carlist [n], end = 'é') IndexError: list index out of range
Would you have a better way to do this?