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
- Today, I learned two related statements: if and else. elif and and.
- elif follows immediately after if in the if statement.
- and is no longer the only condition in the judgment. It must satisfy two or more conditions at the same time to be true.
- 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")