Home  >  Article  >  Backend Development  >  Conditional statements in Python: if else statement

Conditional statements in Python: if else statement

王林
王林Original
2023-08-29 17:41:071013browse

Python中的条件语句:if else语句

email = input("Please enter your email address: ")

Password = input("Please enter your password:")

If email == "superpython@gmail.com" and password == "1234":

---print("Welcome")

elif email == "superpython@gmail.com" and password != "1234":

---print("Wrong password")

---password = input("Enter password again")

---If password == "1234":

------print("Finally correct")

---Others:

------print("Still incorrect")

Others:

---print("Incorrect credentials")

The above is the detailed content of Conditional statements in Python: if else statement. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn