Python dont work

project
python

#1

Hi guys.
why won't my code do what its supposed to do in some places?
I am using Python 3.5.1
Here is my code:

# A Choose your story Game
# By Moagi Moja
# 14 Jan 2015

import sys

inventory = ()
turn_behind1 = ('Candle',)

print('''Welcome to Escape the mansion.
                 0
               --|--
                ''')

print('')
# Ask the person if they are a boy or girl
Gender = input('Are you a boy or a girl?  >>>>')
if Gender == 'Boy':
    print('You are a manly man!')

elif Gender == 'Girl':
    print("You are a super lady!!")


else:
    print('That is not a gender.')

# Ask the player their name
nickname = input('\nWhat is your name?  >>>>')
print('Your name is,', nickname, "Right?")
print('\n Well too bad if it is not.')

input('Press enter to continue...')

print("-----------------------------")
print("")
print("")

#Telling the player where they are
print('''You find yourself in a dark room.
           You also do not remember where you are or know where you are.
              There is a dim light in the room fixed to the wall.''')

if not inventory:
    print('You are empty handed')

    move1 = input('''You can either
                      1 - go through the door infront of you.
                      2 - go to your left to another door
                      3 - go turn behind you and get a candle

                      >>>''')
#First move
if move1 == ('1'):
    print('You fall down a dark staircase and die')
    input('Press enter to exit')
    sys.exit(0)


elif move1 == ('2'):
    print('You just enter a dark closet where a monster eats you and you die')
    input('Press enter to exit')
    sys.exit(0)


elif move1 == ('3'):
    print('''You turn behind you and find a candle on a candle holder.
             You pick it up and add it to your inventory.
             ----------------------------------------------------------''')
#recivinge a candle
inventory += turn_behind1

print('Your inventory now contains:')
print(inventory)
print("")
print("")
print('-----------------------------------------------')

print('Now you can see where you are going with your candle.')
#second move
move2 = input('''Now you can either,
                1 - Go through the door in front of you.
                2 - Go through the other door on your left''')

if move2 == ('1'):
    print('Now you can see, and you can walk down the staircase like a dum - dum')
    print('---------------------------------------------------------------------')
    print('')
    input('\nPress enter to continue...')
    print('\n You are now at the bottom of the staircase.....')

elif move2 == ('2'):
    print('You just enter a dark closet where a monster eats you and you die.')
    print('')
    print('')
    input('Please press enter to exit...')
    sys.exit(0)

else:
    print('That is not a valid choice')

#2

What doesn't work? Asking if someone is a boy or a girl and then check if they are a Boy or a Girl can be a bit tricky, i would convert the input to lowercase, never trust user input.

this bit:

move2 = input('''Now you can either,
                1 - Go through the door in front of you.
                2 - Go through the other door on your left''')

there is no way for the user to tell we need to input something here, you might want to change that

for next time, use one of the two following options to make your code/indent is visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard


#3

So What should I change the move 2 thing to


#4

add something like you did in move1:

>>>'''

so the user know they need to input something


#5

Okay then.

Why does the are you a boy or a girl thing not work properly?


#6

Case sensitivity, like i told you, never trust user input


#7

Okay thanks for your help!

I really appreciate that you gave your time to come and help me.:slightly_smiling::grin: