Question: Write a python code to manage user passport. The code should use python class as follows: The class should have a list called past passwords
Write a python code to manage user passport. The code should use python class as follows: The class should have a list called past passwords that saves all of the user's past passwords. The last item saved in tht list is the current password. Write a function called current _ password that returns the current password - Write a function called update_password that update the user's bassword. The function update_password should only change the password if the new password is different from all the user's past passwords. Write a function called is_correct that receives a string and returns a True or False depending on whether the string is equal to the current password or not. Crete an instance of the class and test it using different passwords
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
