5.3 exercise 11 has me completely stumped

I can’t seem to find the correct answer to this question. The weird thing is when I place the code in the repl, I get the results I expect, but when filling in the blanks with that exact same code, is says the answer is incorrect? What am I missing? Here’s the link to my code with the result https://repl.it/repls/LastingSecondhandWebsites#main.py