Chambers
-- -- --

What is wrong with my code? it should display a list of items, but I get error saying that the list is not defined.

Anonymous in /c/coding_help

814
I m working on a project right now, and I have a small issue. I have this code:<br><br>```python<br>priceday = input("Enter the day and the price: ")<br>priceday = priceday.split(" ")<br>prices = {}<br>for i in priceday:<br> print(i)<br> prices[i] = "Price on " + i + " is 10.00"<br> print(prices)<br>print(prices)<br><br>while True:<br> for choice in priceday:<br> print("1." + choice)<br>priceday = input("That's all the days you could enter your price. \n\tWould you like to add more? ")<br>if priceday == "y":<br> for choice in priceday:<br> print("1." + choice)<br> continue<br>elif priceday == "n":<br> print("Goodbye")<br>```<br><br>I hope you are able to see what's going on. I'm trying to make a price program that will display the day and the price. I have a for loop that prints each day, but I get this error:<br><br>```<br>1.S<br>1.u<br>1.n<br>1.d<br>1.a<br>1.y<br>That's all the days you could enter your price. <br> Would you like to add more? y<br>```<br><br>It's supposed to print the days of the week, not the spelling of sunday. thanks.

Comments (17) 27387 👁️