I'm really new to programming so I wasn't exactly sure how even to word my question. What I am trying to accomplish is to allow a user to enter in attributes about a specific item over several items and record each value to a variable.
So for instance, cars. User would be prompted with three questions about the car: Make, model, year. This process would loop until there are no items left.
This is what I've got:
while True:
answer=raw_input('Is there another car? Y/N')
if answer=Y:
make=raw_input('Car manufacturer?')
model=raw_input('Car Model?')
year=raw_input('Year?')
elif answer=N:
break
else:
print 'Incorrect Response'
I know the code is really shakey, but the goal is that every time the loop passes, it records the user inputs to a new set of variables (for instance, make1, model1, year1, make2, model2, etc). That way I can compile all the data afterwards without the variables being over-written with each pass, like it would with my current code.
Thanks for your help.
make1,make2,make3, consider making a single list variablemakes, which contains multiple values.