Printing a greeting of your choice


Q: Write a program that prints a greeting of your choice, perhaps in a language other than English.

Input:

  • Your choice number from the menu.
Output: 
  • prints a greeting

The Code:

#CScientists.
print("Please choose one of these: ")
print("1 - Hey\n2 - Hello\n3 - How are you doing?\n4 - Good morning\n5 - Good evening")
Choice = int(input("Please enter your choice: "))
if Choice == 1:
    print("Hey")

if Choice == 2:
    print("Hello")
 
if Choice == 3:
    print("How are you doing?")
 
if Choice == 4:
    print("Good morning")
 
if Choice == 5:
    print("Good evening")

#CScientists.

No comments:

Post a Comment