How do make it detect input? in python -


i tried set shop system this:

def command():     command = input("press \"c\" continue , earn $1 or \"s\" go shop! -->")  def display_shop():     print ("buy stuff @ shop like:")     print ("")     print ("double money - gives $2 instead of $1")     item = input("which item want?")     if item == ("double money"):     doublemoney = true     print("added (double money)") work1()   def work1(): chop = input('type \"c\" earn $1 -->') global win if chop == ('c') , win == false:     global gold     global command     time.sleep(1)     print ('$1 earned')     if doublemoney == true:         gold = gold+2     if doublemoney == false:         gold = gold+1     displaymoney()     chop = 0     command()     if gold == 100:         win = true work1() 

my problem is, each time run it, , see question:

 "press \"c\" continue , earn $1 or \"s\" go shop! -->" 

i type "s" , registers "c" , runs work1(). how supposed fix registers "s"? please reply soon. thank you!


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -