diff options
| author | mo khan <mo@mokhan.ca> | 2025-01-12 13:32:08 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-01-12 13:32:08 -0700 |
| commit | f9b7f6b5fc4e463611e1d6c5d8d8b7e73157ae93 (patch) | |
| tree | 3ae19626a40e0a0b91730b230b86e8ba51468db6 /projects | |
| parent | b23ced3867dce69427ea7e4f0e7c34d3db4709c7 (diff) | |
finish program 3
Diffstat (limited to 'projects')
| -rwxr-xr-x | projects/2/prog3.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/projects/2/prog3.py b/projects/2/prog3.py index 7e390bd..c491a71 100755 --- a/projects/2/prog3.py +++ b/projects/2/prog3.py @@ -3,5 +3,17 @@ print(""" Program author: mo khan ID: 3431709 -Program 3 - Loops And If Conditions +Program 3-LOOPS AND IF CONDITIONS """) + +while input("Password? ") != 'hello': + print() + +print('Welcome to the second half of the program!') +name = input("What is your name? ") +if name == 'mo': + print("What a great name!") +elif name == 'Madonna' or name == 'Cher': + print("May I have your autograph, please?") +else: + print("{}, that's a nice name".format(name)) |
