In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to quickly master the practical application of Vue3 enterprise". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to quickly master the practical application of Vue3 enterprise".
Understand the basic syntax of TS
1 import random
2 if name = = "main": # Generation of four-digit alphabetic test codes
3 checkcode= "# keep the amount of the test code
4 for i in range (4):
5 index=random.randrange (0B4) # generate a number in 03s
6 if indexers and index + 1! = I:
7 checkcode + = chr (random.randint (97122)) # generate a lowercase letter in axiz
8 elif index + 1 resume I:
9 checkcode + = chr (random.randint (65 minutes 90)) # generates a capital letter in Atrez
10 else:
11 checkcode + = str (random.randint (1pm 9)) # Numeric 1-9
12 print (checkcode)
Trail code
Input: M47A, 8wQ9, vugS
two. Formatting time function
1 def formatTime (longtime):
2''the function in formatting time''
3 import time
4 return time.strftime ("Y-%m-%d H:%M:%S", time.localtime (longtime))
three. Record the current log log practice
Trail code
Import time
Def show_info ():
Print ('input prompt number to perform corresponding operation
0: exit
1: view login logs
'')
Def write_loginfo (username):
"
Log in with login name and login time
: param username: use the alias name
"
With open ('log.txt','a') as f:
String = "use alias: {} login time: {}\ n" .format (username, time.strftime ('% Y-%m-%d% HV% MHD% Shop time.localtime (time.time ()
F.write (string)
Def read_loginfo ():
"
Fetch logs
"
With open ('log.txt','r') as f:
While True:
Line = f.readline ()
If line ='':
Break # jumping out of the loop
Print (line) # enter a line of content
If name = = "main":
Enter username username = input ('enter username:') # check username while len (username) < 2: print ('use nickname length should be no less than 2 digits') username = input ('enter nickname:') # enter password password = input ('enter password:') # check password while len (password) < 6: print ('password length should be no less than 6 digits') Password = input ('enter password:') print ('login profit') write_loginfo (username) # entry date show _ info () # prompt message num = int ('import operation number:') # input number while True: if num = 0: print ('exit profit') break elif num = 1: print ('check Look at the log log') read_loginfo () show_info () num = int (input ('import operation number:') else: print ('wrong number entered by you') show_info () num = int (input ('import operation number:'))
three. Imitate Taobao customer service automatic response
Trail code
1 # Task 2: imitate Taobao customer service automatic response
two
3 def find_answer (question):
4 with open ('reply.txt','r') as f:
5 while True:
6 line=f.readline ()
7 if not line: # can also be regarded as if line==''
8 break
9 keyword=line.split ('|') [0]
10 reply=line.split ('|') [1]
11 if keyword in question:
12 return reply
13 return Sorry, there is no problem you are looking for
fourteen
15 if name = 'main':
16 question=input ('enter what you want to post:')
17 while True:
18 if question=='bye':
19 break
20 reply=find_answer (question)
21 if not reply:
22 question=input ("Xiaomi does not understand what you are buying, you can check some content related to orders, accounts and payments (please enter bye for exit):")
23 else:
24 print (reply)
25 question=input ("you can check some content related to orders, accounts and payments (please enter bye for exit):")
26 print ('Thank you, goodbye!')
twenty-seven
Trail code
Trail code
four. Find the maximum number of conditions and the minimum common multiple (rolling division)
Maximum number of variables: the largest of the variables shared by two or more integers
Least common multiple: the common multiple of two or more integers is called their common multiple, and the smallest common multiple except 0 is called the least common multiple of these integers.
Relationship between the two: the number of two numbers = the minimum common multiple * the maximum number of treaties
Trail code
1 a=int (input ('enter the number 1'))
2 b=int (input ('enter the number 2'))
3 s=a*b
4 while a% breadth 0:
5 a dint baub, (a% b)
6 print (a)
7 print (b)
8 else:
9 print (maximum number of the maximum common divisor the maximum common divisor')
10 print (sdeband bmagedicis the least common multiple, least common multiple')
Thank you for your reading, the above is the content of "how to quickly grasp the practical application of Vue3 enterprises". After the study of this article, I believe you have a deeper understanding of how to quickly master the practical application of Vue3 enterprises, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.