Python users log on three times

Get a project, first split the demand, the code can not split a complete and correct finish.
For example:
Requirements: Users log on three times, success: print successful login; three failed quit.
Step a: splitting function
1, username and password authentication

Python users log on three times

2, three chances:

Python users log on three times

Step two: patchwork functions:
Python users log on three times

Step three: commissioning, complete:

Python users log on three times

So far, this code is completed.

Guess you like

Origin blog.51cto.com/851675/2477141