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

Conditional statements in Python: if else statement

王林
Release: 2023-08-29 17:41:07
Original
1097 people have browsed it

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!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template