repl.it
@MuntahaIslam/

Conditional Statements

Python

The name defines.

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
hasMoney = False
isSmoker = False
hasGirlfriend = False

print("\nReply with Y or N.\n")
if input("Do you have much money? ") == "Y":
    hasMoney = True
if input("Do you drink/smoke? ") == "Y":
    isSmoker = True
if input("Do you have a girlfriend? ") == "Y":
    hasGirlfriend = True

if not hasMoney and (isSmoker or hasGirlfriend):
    print("\nProblems will be generating eventually.")
else:
    print("\nNo problems!")
?