二手产品经理

二手产品经理

THIS IS RENO

Learn Python Online in 100 Days - Day Six

Study Notes

  1. Today, I learned two related statements: if, else, elif, and, and.
  2. elif follows the if statement in the judgment.
  3. and is used when multiple conditions must be met for the statement to be true.
  4. Indentation is crucial!

CODE

print("MY LOGIN SYSTEM")
print("+++++++++++++++")
varname=input("Username > ")
varpasswd=input("Password > ")
if varname=="David" and varpasswd=="toallyNotBald":
  print("Hey David")
elif varname=="lily" and varpasswd=="toallyNotBald":
  print("Hey Lily")
elif varname=="Jo" and varpasswd=="toallyNotBald":
  print("Hey Jo")
else:
  print("Go Away")
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.