当前位置:网站首页>Login interface code
Login interface code
2022-07-05 13:57:00 【Beauty of algorithm and programming】
0 introduction
We have learned a lot Python knowledge , But it's abstract , I don't know the actual application of these codes in our real life . I think today app The rapidly developing information age , If we want to enter a APP Or some interface will require us to enter our account and password , This is the protection of our personal information security ; however , Do you know how the login process came about ? Today we will use a simple code to parse the source of the login interface we often encounter in our life .
1 problem
In the information age , Our biggest concern is personal privacy , When we use software , The software will collect our personal information , If criminals collect and use our information , Then the consequences will be unimaginable . therefore , We need to set the login interface , Enter the software by entering the password , So how should we do it ?
2 Method
First, create two input lines named account and password , Then enter with for in Loop to set the input opportunity to three times , Reuse if Conditional sentence to judge whether the input is correct , Report an error every time you make a mistake , If you don't lose right three times, output ‘ The user is locked ’. If the input is correct, output ‘ Successfully logged in ’.
3 Experimental results and discussion
Finally, the experiment proves that , The method performs effectively :
Code list 1
| n=input(' account number :') m=input(' password :') for i in range(2): if n=='daiwei' and m=='5201314': print(' Successfully logged in ') break else: print(' Input error ') print('<'*10) print('1、 Re input ') print('2、 sign out ') option = input(" Please select :") if option=='1': n = input(' account number :') m = input(' password :') if n == 'daiwei' and m == '5201314': print(' Successfully logged in ') else: print(' This number is locked ') |
4 Conclusion
Last , Let's type out the code of the simple login interface ! The code tends to be basic , The main difficulty is to count the number of times with cycles , As for the general procedure , There will be more operations after we log in , We'll talk about the specific content next time .
边栏推荐
- Rk3566 add LED
- PHP basic syntax
- Detailed explanation of IP address and preparation of DOS basic commands and batch processing
- ::ffff:192.168.31.101 是一个什么地址?
- 荐号 | 有趣的人都在看什么?
- Leetcode array question brushing notes
- 2022司钻(钻井)考试题库及模拟考试
- 锚点导航小demo
- Redis6 data type and operation summary
- [South China University of technology] information sharing of postgraduate entrance examination and re examination
猜你喜欢
![[South China University of technology] information sharing of postgraduate entrance examination and re examination](/img/a8/41e62a7a8d0a2e901e06c751c30291.jpg)
[South China University of technology] information sharing of postgraduate entrance examination and re examination

IP packet header analysis and static routing

Xampp configuring multiple items

Solve the problem of invalid uni app configuration page and tabbar

Data Lake (VII): Iceberg concept and review what is a data Lake

-Web direction attack and defense world

In addition to the root directory, other routes of laravel + xampp are 404 solutions

NFT value and white paper acquisition

LeetCode_2(两数相加)
Jetpack Compose入门到精通
随机推荐
Aikesheng sqle audit tool successfully completed the evaluation of "SQL quality management platform grading ability" of the Academy of communications and communications
Can graduate students not learn English? As long as the score of postgraduate entrance examination English or CET-6 is high!
Jetpack compose introduction to mastery
Apicloud studio3 WiFi real machine synchronization and WiFi real machine preview instructions
[server data recovery] a case of RAID5 data recovery stored in a brand of server
leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
Prefix, infix, suffix expression "recommended collection"
Basic characteristics and isolation level of transactions
锚点导航小demo
基于微信小程序的订餐系统
LeetCode_69(x 的平方根 )
How to deal with the Yellow Icon during the installation of wampserver
Comparison of several distributed databases
2022 driller (drilling) examination question bank and simulation examination
::ffff:192.168.31.101 是一个什么地址?
Redis6 transaction and locking mechanism
JS takes key and value from an array object to form a new object
Personal component - message prompt
物联网应用技术专业是属于什么类
Solve the problem of "unable to open source file" xx.h "in the custom header file on vs from the source