このpythonコードに問題がありました。コーディングを始めたばかりで、なぜ機能しないのかわかりません。ループの繰り返しを止めることができません。何を入力しても add_item 関数が開始されます。任意のヒント?
supply = { #Creates blank dictionary
}
print "Would you like to add anything to the list?"
def add_item(*args): #Adds a item to the supply dictionary
print "What would you like to add?"
first_item = raw_input()
print "How much does it cost?"
first_price = raw_input()
supply[first_item] = float(first_price)
response = raw_input()
while response == "yes" or "Yes" or "YES":
if response == "yes" or "Yes" or "YES": #Added this because it wasn't working, didn't help
add_item()
print "Alright, your stock now reads:", supply
print "Would you like to add anything else?"
response = raw_input()
elif response == "no" or "No" or "NO":
print "Alright. Your stock includes:"
print supply
break
else:
print "Sorry I didn't understand that. Your stock includes:"
print supply
break
print "Press Enter to close"
end_program = raw_input()