-3

Shouldn't it check the first if statement and go to black_room if donate_money = 0 and spend_money is 20?

def white_room():
    spend_money = raw_input("How much money have you spent?")
    donate_money = raw_input("How much money have you donated?")

    if (donate_money <= 0 and spend_money > 10): 
        print "You go to the black room!!"
        black_room()
    elif (donate_money > 0 and spend_money > 10):
        print donate_money
        print spend_money
        print "You can stay here..."
        white_room()
    else:
        print "You can live in the silver room forever"
Vidar
  • 4,141
  • 5
  • 24
  • 30
eager_coder
  • 47
  • 1
  • 8
  • Was going to answer but also you have to do int(spend_money) and int(donate_money) to do a numerical comparison. – Matt Jul 18 '16 at 14:04

1 Answers1

0

Change raw_input to just input, see How can I read inputs as integers? for details

spend_money = input("How much money have you spent?")
donate_money = input("How much money have you donated?")
Community
  • 1
  • 1
depperm
  • 10,606
  • 4
  • 43
  • 67