0
I trying do matching password using def function but I can't fix that? password = input() repeat = input() def
Matching Passwords
4 Réponses
+ 1
The total code is wrong all of you .
Lets see;;
Password = input()
Repeat = input()
def validate(text1, text2):
If Password == Repeat:
Print(text1)
Else :
Print(text2)
validate("Correct","Wrong")
0
Whole code looks like that but still not work password = input()
repeat = input()
def validate(password,repeat):
return password == repeat
if password == repeat:
print("correct")
else:
print("wrong")
0
after you have created the validate function, you should call it like this:
if validate(password, repeat):
print("correct")
else:
print("wrong")
0
It is possible that the error is in the code because you did not type the first capital letters in the wrong and correct