Answer to Question #286312 in Python for Jovelyn

Question #286312

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!


1
Expert's answer
2022-01-10T07:38:08-0500
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!")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS