CNSA-266-Personal/Order.py
2024-04-23 09:40:13 -04:00

42 lines
1.5 KiB
Python

import time
fName = input("Enter your first name: ")
lName = input("Enter your last name: ")
fullAddress = input("Enter your full address, seperated by semicolons (;): ")
while True:
SSN = input("Enter your SSN in numerical format (e.g. 312943821): ")
if len(SSN) == 9:
break
else:
print("invalid SSN!")
time.sleep(0.3)
while True:
payType = input("Enter your payment type (options are: MasterCard, Discover, Visa, Cash, or Check: ")
if payType.upper() == "MasterCard".upper() or payType.upper() == "VISA".upper() or payType.upper() == "CASH".upper() or payType.upper() == "CHECK".upper() or payType.upper() == "DISCOVER".upper():
break
print("Please enter a valid payment type.")
time.sleep(0.3)
uName = input("Enter your username: ")
uPassword = input("Enter your password: ")
uEmail = input("Enter your email address: ")
fullAddress = fullAddress.split(';')
print("\n" * 8)
print("Confirmation for " + fName + " " + lName + " at ", end="")
trace = 0
for i in fullAddress:
if trace == len(fullAddress)-1:
print(i.strip()+". ", end="\n")
else:
print(i.strip()+", ", end="")
trace += 1
print("The last 4 digits of your SSN is ***-**-" + SSN[5:] + ".")
print("Your payment will be made with " + payType + ".")
print("Your username is: " + uName)
hPass = ""
while len(hPass) < len(uPassword):
hPass = hPass + "*"
print("Your password (hidden) is: " + hPass)
print("An email has been sent to you at: " + uEmail + ".", end="\n"*3)
print("Thank you!")