-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday5.py
More file actions
23 lines (18 loc) · 710 Bytes
/
day5.py
File metadata and controls
23 lines (18 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# # Question 6 — ATM Machine
# # Write a program that:
# # Has a balance of ₦100,000
# # Uses a while loop to keep asking the user for a PIN
# # The correct PIN is 1234
# # After 3 wrong attempts print Your card has been blocked! and stop
# # Once logged in show a menu using while True:
# # Option 1 — Check balance
# # Option 2 — Withdraw money
# # Option 3 — Exit
# # For withdrawal check if user has sufficient funds
# Question 5 — Guessing Game
# Write a program that:
# Has a secret number of 42
# Uses a while loop to keep asking the user to guess
# Tells the user if their guess is too high, too low or correct
# Counts how many attempts it took
# Stops when the user guesses correctly