Skip to content

Commit 31a0e02

Browse files
committed
assignment 2 task 2
1 parent bcfca9b commit 31a0e02

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

10. classes/4.1. assignment_2-2.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ def increment_login_attempts(self):
2828
def reset_login_attempts(self):
2929
self.login_attempts = 0
3030

31+
32+
user = User('fazle', 'yazdan')
33+
34+
user.increment_login_attempts()
35+
user.increment_login_attempts()
36+
user.increment_login_attempts()
37+
38+
print(f"\nLogin attempts by the user are: {user.login_attempts}")
39+
40+
user.reset_login_attempts()
41+
print(f"\nLogin attempts by the user after resetting: {user.login_attempts}")

0 commit comments

Comments
 (0)