How do I make it so that if I enter my_secret key it'll say "Logged in!"
Whoever helps me with it can gets 5 cycles.
read about the environment variables so you know where to set the key:
Assuming you set the key as
my_secret, you just need to do:
import os my_secret = os.getenv('my_secret') k = input('KEY :') if k == my_secret: print("logged in!") # more code...
firstly, there is no need to say "Whoever helps me with it can gets 5 cycles.
". Anyways, use an if statement to implement this:
import os my_secret = os.environ['key'] k = input('KEY: ') if k == my_secret: print('Logged in!')