CS101 Introduction to Programming Final Project: Not sure why this won't print!

The project is a game I’m making for the final project of CS101 Introduction to Programming.
TheNoodleCat/lost-n-found: A project I’m working on for the first project of Codecademy’s Computer Science Course. (github.com)

The specific portion of the code is “option_1”, and while all selections up to deciding where to search have returned their statements properly, my if/else statements will not print either the flavor text for if you get your guess wrong, or the congratulatory message of that you won the game. I have tried removing the congratulatory message to see if the flavor text would print, and I have tried removing return to see if it was simply “not returning” the print message in specifics. I’m not quite sure why it isn’t working, and I’m making sure each piece works before I add another portion of the game.

 def option_1(self, get, obtain):
        finders_keepers = Find_it()
        plate = input("Where are you looking? Type 'LIST' to view potential areas.")
        if plate.lower() == "list":
            observe = input("""Your options are:
    Shelf
    Box
    Bucket
    Floor
    Cupboard
    Table
    Counter
Please type the area you wish to search
""")
            if observe.lower == "shelf":
                if obtain == "shelf":
                    print("You win!")
                else:
                    print("You look at the shelf. You see various things that have ended up here today, but none are what you're looking for.")
            if observe.lower == "box":
                if obtain == "box":
                    print("You win!")
                else:
                    print("Looking in the box, you see things varying from game cards to chargers. Nothing you're looking for, though.")
            if observe.lower == "bucket":
                if obtain == "bucket":
                    print("You win!")
                else:
                    print("You've always believed the bucket held many mysteries - but said mysteries are not the answer to the riddle before you right now.")
            if observe.lower == "floor":
                if obtain == "floor":
                    print("You win!")
                else:
                    print("Nothing seems to have fallen off the table, and the floor itself has been recently cleaned. Nice!")
            if observe.lower == "cupboard":
                if obtain == "cupboard":
                    print("You win!")
                else:
                    print("Sometimes you wish there were actual cups in here. Then again, it might be a kitchen if it had cups and the like in the cupboard.")
            if observe.lower == "table":
                if obtain == "table":
                    print("You win!")
                else:
                    print("The table has always been a little cluttered, but no matter how many things you've found here in the past, it doesn't seem to be here today.")
            if observe.lower == "counter":
                if obtain == "counter":
                    print("You win!")
                else:
                    print("The bucket is up here, but nothing else, really.")

If there is any direction someone could point me in about this, that would be really awesome!

Hello, @kittiebloo.

Consider the difference between these two lines of your code:

Hint
>>> a = "CAT"
>>> a.lower == 'cat'
False
>>> a.lower() == 'cat'
True
>>> print(a.lower)
<built-in method lower of str object at 0x000001B666EF7970>
>>> print(a.lower())
cat
2 Likes

Oh my goodness! I completely spaced that I made that difference! Thank you so much! I fixed it after you made that point, and I get the text I wanted to see now.

1 Like