Python numbers game reverse

后端 未结 4 1993
我在风中等你
我在风中等你 2021-01-29 13:07

So I have to make a \"game\" on python were I think of a number and it tries to guess the number. I have to tell it if it\'s higher or lower than the number it guessed and conti

4条回答
  •  清歌不尽
    2021-01-29 13:36

    You can save the numbers it guessed in a list and then you check if a new guess is already in the list or not. initialise an empty list like so:

    guessed=[]
    

    and then you can append guesses made by your program into the list

    guessed.append(guess)
    

提交回复
热议问题