Process Control and process management
Process Control
-- Daoxin
Enter the user name for judgment
Name = input ("Enter the User name:") # Compare the value and memory address (the value is the same, and the memory does not have to be the same)
If name = "daoxin ":
Print ("Login successful ")
Else:
Print ("Logon Failed ")
Enter the user name and password for determination:
Import getpass
Name = input ("enter username:") # Compare values, compare memory addresses (same values, not the same memory), is values, and memory addresses are the same
Pwd = getpass. getpass ("enter the password :")
If name = "daoxin" and pwd = "123 ":
Print ("Login successful ")
Else:
Print ("Logon Failed ")
Output:
Enter the user name daoxin.
Enter the password:
Login successful
If IndentationError occurs during code execution, it indicates code indentation error.