当前位置:网站首页>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 .
边栏推荐
- When there are too many input boxes such as input transmitted at one time in the form, the post data is intercepted
- Etcd database source code analysis -- rawnode simple package
- Zhubo Huangyu: it's really bad not to understand these gold frying skills
- 2022 construction welder (special type of construction work) special operation certificate examination question bank and online simulation examination
- Ordering system based on wechat applet
- 网络安全-HSRP协议
- -Web direction attack and defense world
- LeetCode_2(两数相加)
- 什么叫做信息安全?包含哪些内容?与网络安全有什么区别?
- Network security HSRP protocol
猜你喜欢

Redis6 master-slave replication and clustering

Attack and defense world crypto WP

Can graduate students not learn English? As long as the score of postgraduate entrance examination English or CET-6 is high!

redis6事务和锁机制

金融壹账通香港上市:市值63亿港元 叶望春称守正笃实,久久为功

神经网络物联网未来现状和趋势及看法

Wonderful express | Tencent cloud database June issue

ZABBIX monitoring

Aikesheng sqle audit tool successfully completed the evaluation of "SQL quality management platform grading ability" of the Academy of communications and communications

IP packet header analysis and static routing
随机推荐
Aikesheng sqle audit tool successfully completed the evaluation of "SQL quality management platform grading ability" of the Academy of communications and communications
In addition to the root directory, other routes of laravel + xampp are 404 solutions
Wechat app payment callback processing method PHP logging method, notes. 2020/5/26
What is information security? What is included? What is the difference with network security?
Matlab learning 2022.7.4
poi设置列的数据格式(有效)
Require, require in PHP_ once、include、include_ Detailed explanation of the efficiency of repeated introduction of once class library
Requset + BS4 crawling shell listings
那些考研后才知道的事
Kafaka log collection
[South China University of technology] information sharing of postgraduate entrance examination and re examination
Summit review | baowanda - an integrated data security protection system driven by compliance and security
Jetpack compose introduction to mastery
研究生可以不用学英语?只要考研英语或六级分数高!
Address book (linked list implementation)
Zhubo Huangyu: it's really bad not to understand these gold frying skills
Kotlin协程利用CoroutineContext实现网络请求失败后重试逻辑
web3.eth. Filter related
2022 driller (drilling) examination question bank and simulation examination
Assembly language - Beginner's introduction