Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to make a Password in Python (for beginners)
BlobfacebyBSP (3)

Line 1,

realpass = 'Easy_Password

is your Password (Easy_Password) it variable for your password your variable(realpass).

Line 2,

passw = input('Password : ')

So this is the question kind of that asking you for the password. It is also a variable.

Line 3&4,

if real_pass == passw:
print('Correct.')

this is saying that if the realpass (Line 1 variable) equals passw (Line 2 variable)then it should say "Correct." I assume that you know the very very very very basics like "print."

Line 5&6,

else:
print('Incorrect.')

this is saying that if realpass (Line 1 variable) doesn't equal passw (Line 2 variable) then it should say "Incorrect."

Notes,

I think you can do this you can custom the "print" and you can custom password that you're actually writing.

Help,

This is my first tutorial if you see something wrong with it please tell me in the comments!!!