Jump to content
Killersites Forums

Python 3 Course: Treasure Hunt Game


Recommended Posts


I've been going through the videos 40 to 44 and writing all the code for the Treasure Hunt Game. I keep getting an error message:

TypeError: int() argument must be a string, a bytes-like object or a number, not 'function'

random_cave = random.randint(1,2)

    if random_cave == int(chose_cave):
        print("---->you found treasure!")
        print("---->you were eaten by a monster")


Any ideas? Is this just a version problem? Using 3.6.5 




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...