二手产品经理

二手产品经理

THIS IS RENO

Learn Python Online in 100 Days - Day 6

Today's condition is not very good. It has been 9 days since the tooth extraction and implantation, and the gums are still swollen. The cold air also came today, feeling unwell all over!

Learning Record

  1. Today, I learned two related statements: if and else. elif and and.
  2. elif follows immediately after if in the if statement.
  3. and is no longer the only condition in the judgment. It must satisfy two or more conditions at the same time to be true.
  4. Indentation is really important!

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.