The Student Room Group

Python

this code is not working
Reply 1
Original post by Inshaal
this code is not working

Can you give any more detail?

Is the code not running at all?

Is it running but giving a different result from expected?

Do you get any error messages - syntax errors or runtime errors?

Have you tried putting any debugging messages in to help you find the problem?
It looks like you have misspelled one of your variable names. Take a look at the code:

login_store = open("players.txt", "i")
users = login.readlines()

'login' on its own is never defined. I assume what you mean is:

users = login_store.readlines()

It'd be helpful to see any error messages that occur as well to further help you.

Quick Reply

Latest

Trending

Trending