Need help to success the code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Need help to success the code

You are given a program with two inputs: one as password and the second one as password repeat. Complete and call the given function to output "Correct" if password and repeat are equal, and output "Wrong", if they are not.

27th Aug 2020, 2:08 PM
Boom
Boom - avatar
4 Answers
+ 7
♤♢☞ 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ☜♢♤ , # there is nothing wrong with this code, just a try to optimize it: def validate(password, repeat): return password == repeat password = input( ) repeat = input() print(f'password validation is {validate(password,repeat)}!')
28th Aug 2020, 11:54 AM
Lothar
Lothar - avatar
+ 6
Nobody can see your code, as it is a link to your code coach solution.
27th Aug 2020, 3:12 PM
Lothar
Lothar - avatar
0
This is the problem given in that coach ---> You are given a program with two inputs: one as password and the second one as password repeat. Complete and call the given function to output "Correct" if password and repeat are equal, and output "Wrong", if they are not.
27th Aug 2020, 3:28 PM
Boom
Boom - avatar
0
Here ---- password = input( ) repeat = input() def validate(password, repeat): if (password == repeat): print("correct") else: print('wrong') validate('john894', 'john895')
27th Aug 2020, 4:26 PM
Boom
Boom - avatar