当前位置:网站首页>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 .
边栏推荐
- Idea remote debugging agent
- Set up a website with a sense of ceremony, and post it to the public 2/2 through the intranet
- jasypt配置文件加密|快速入门|实战
- [machine learning notes] several methods of splitting data into training sets and test sets
- 2022 driller (drilling) examination question bank and simulation examination
- Prefix, infix, suffix expression "recommended collection"
- Laravel framework operation error: no application encryption key has been specified
- [South China University of technology] information sharing of postgraduate entrance examination and re examination
- LeetCode_3(无重复字符的最长子串)
- Scientific running robot pancakeswap clip robot latest detailed tutorial
猜你喜欢

NFT value and white paper acquisition

Introduction to Chapter 8 proof problem of njupt "Xin'an numeral base"

::ffff:192.168.31.101 是一个什么地址?

Brief introduction to revolutionary neural networks

治臻新能源冲刺科创板:年营收2.2亿 上汽创投是股东

基于微信小程序的订餐系统

清大科越冲刺科创板:年营收2亿 拟募资7.5亿
![[machine learning notes] several methods of splitting data into training sets and test sets](/img/f6/eca239bb4b1764a1495ccd9a868ec1.jpg)
[machine learning notes] several methods of splitting data into training sets and test sets

Convolutional Neural Networks简述

redis6事务和锁机制
随机推荐
常见问题之PHP——Fatal error: Allowed memory size of 314572800 bytes exhausted...
Network security - Novice introduction
Liste des liens (simple)
Rk3566 add LED
Redis6 transaction and locking mechanism
Deep copy is hard
Liar report query collection network PHP source code
金融壹账通香港上市:市值63亿港元 叶望春称守正笃实,久久为功
Require, require in PHP_ once、include、include_ Detailed explanation of the efficiency of repeated introduction of once class library
upload (1-6)
RK3566添加LED
matlab学习2022.7.4
2022年机修钳工(高级)考试题模拟考试题库模拟考试平台操作
2022司钻(钻井)考试题库及模拟考试
Redis6 data type and operation summary
zabbix 监控
In addition to the root directory, other routes of laravel + xampp are 404 solutions
Ordering system based on wechat applet
Requset + BS4 crawling shell listings
Assembly language - Beginner's introduction