I am new to python an I am wondering why my code isn't working.
Here is the code:
print("\n \n Would you like a phone case for your phone? \n \n We have a rubber case for 20 MYR and a carbon fiber case for 100 MYR.")
case = str(input("\n \n Do you want one?")).upper
while (case != "YES" and case != "NO"):
print("\n Sorry, what do you mean?")
case = str(input()).upper()
if (case) == ("YES"):
case = 'yes'
casetype = str(input("\n \n Which one would you like?")).upper
if (casetype) == ("RUBBER CASE"):
casetype = 'rubber case'
money = money + 20
if (casetype) == ("CARBON FIBER CASE"):
casetype = 'carbon fiber case'
money = money + 100
But the output when I reply 'yes' to when it asks me if I would like a case or not is: "sorry, what do you mean?"
These lines need to make a function call:
Like this:
Otherwise you are storing the
str.uppermethod as a variable