0

for some reason when I hit the last line and I select "n" it do not show the last print "you cannot get a refund vs if I selected "y" it executed well and print "you can get a refund" can anybody help?

refund_item = int(input('How many days ago you purchased the item? '))
if refund_item >10:
  print("You cannot get a refund.")
else:
  refund_item_b =input('Have you use the item? y/n:')
  if refund_item_b == 'y' or 'n':
    refund_item_c = input('Has the item broken on its own? y/n:')
    if refund_item_c == 'y':
      print("You can get a refund.")
  else:
    if refund_item_c == 'n':
      print("You cannot get a refund.")
tyblo
  • 99
  • 4
  • `refund_item_b == 'y' or 'n'` - that's not how it works. To check if a thing is either a or b, you use `thing == a or thing == b` in python. – gog Oct 12 '22 at 15:53
  • 1
    Well just by inspection if you press n for your "Has the item broken on its own?" statement there is no condition to handle that. – MFerguson Oct 12 '22 at 15:53

0 Answers0