How am i gonna solve the problem i have atm?
I have a dictionary with a key: names, the value to each name are how many cars each name have.
Now i wanna build a loop where i can loop through each value ( each car ) and get the user to input which color each car has and “save” that to each name. ( The end result should be something like:
Erik, you have 4 cars. Your 1 car is red, 2 (second) blue, etc etc…
So i kinda have to make a list with each color within the dictionary for each person.
Im able to solve this with 1 person. But when i get the user to input 2 names, i get stuck because i use a counter to count throguh each value of person 1, but since the counter reach the value of person 1 it loops to next person but doesnt ask the user to input the colors of the second persons cars since the counter has not reset.
I need to kinda reset the counter when the first person is completed and loop to next person somehow.
Or maybe there is a more effective way to make a “counter”.