Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the actual combat cases of python?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail about the actual combat cases of python, which the editor thinks is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Task 1: loop output 26 letters corresponding to the ASCII code value xsq9 represents the ASCII value of a for _ in range (1Jing 27): print (chr (x),'- >' X) x+=1print ('-') x=97while x 97b-> 98c-> 99d-> 100e-> 101f-> 102g-> 103h-> 104i-> 105J-> 106k-> 107l -> 108m-> 109n-> 110o-> 111p-> 112q-> 113r-> 114s-> 115t-> 116u-> 117v-> 118w-> 119x-> 120y-> 121z-> 122- -a-> 97b-> 98c-> 99d-> 100e-> 101f-> 102g-> 103h-> 104i-> 105J-> 106k-> 107l-> 108m-> 109n- > 110o-> 111p-> 112q-> 113r-> 114s-> 115t-> 116u-> 117v-> 118w-> 119x-> 120y-> 121z-> 122 tasks 2, Simulated user login for i in range (1Please enter user name:) user_name=input ('Please enter user name:') user_pwd=input ('Please enter password:') if user_name=='admin' and user_pwd=='8888': print ('login successful') break else: print ('incorrect user name or password!') If i

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report