Create a python program of this output.
Choices:
1 - Output 1
2 - Output 2
3 - Output 3
Enter your choice: 1
Output:
Enter your First name: Curry
Enter your Middle name: Klay
Enter your Last name: Ramos
Is it am or pm?: am
Good morning, Curry Klay Ramos! Have a great day ahead.
Do you want to try again?: Y
Enter your First name: Curry
Enter your Middle name: Klay
Enter your Last name: Ramos
Is it am or pm?: pm
Good night, Curry Klay Ramos! You deserve to take some rest.
Do you want to try again?: Y
Thank you!
print("Choices:")
print("1 - Output 1")
print("2 - Output 2")
print("3 - Output 3")
choice=int(input("Enter your choice: "))
answer="y"
while answer=="y":
if choice==1:
firstName=input("Enter your First name: ")
middleName=input("Enter your Middle name: ")
lastName=input("Enter your Last name: ")
am_pmName=input("Is it am or pm?: ")
if am_pmName.lower()=="am":
print(f"Good morning, {firstName} {middleName} {lastName}! Have a great day ahead.")
else:
print(f"Good night, {firstName} {middleName} {lastName}! You deserve to take some rest.")
if choice==2:
pass
if choice==3:
pass
answer=input("Do you want to try again?: ")
print("Thank you!")
Comments
Leave a comment