In: Computer Science
In PYTHON OF JUPIDER NOTEBOOK
Write a program that prompts the user to enter his/her
nationality (French/french, Italian/italian, or Spanish/spanish).
Then ask his/her name using a prompt message in his/her own
language (use Google Translate if you need). After getting the
name, again greet him/her using a greeting message in his/her own
language.
If the user is not from any of the above nationalities just use
English to prompt for name and to greet the user.
Example 1:
Nationality? french
quel est votre nom? Patrick
Bonjour Patrick , mon nom est Python!
Example 2:
Nationality? Canadian
What is your name? Alex
Hello Alex , my name is Python!
Required program in python -->
nationality = input("Nationality ?") #ask user for
nationality
if(nationality=="french" or nationality=="French" or
nationality=="FRENCH"): #if nationality is french
name=input("quel est votre nom?") #ask name
print("Bonjour",name,",mon nom est Python") # print
Bonjour",name,",mon nom est Python
elif(nationality=="spanish" or nationality=="Spanish" or
nationality=="SPANISH"): #if nationality is spanish
name=input("Cuál es tu nombre ?") #ask name
print("Hola",name,"mi nombre es python") #print Hola",name,"mi
nombre es python
elif(nationality=="italian" or nationality=="Italian" or
nationality=="ITALIAN"): #if nationality is italian
name=input("come ti chiami?") #ask name
print("Ciao",name,"il mio nome è python") #print Ciao",name,"il mio
nome è python
else: #if any other nationality
name=input("What is your name?") #ask name
print("Hello",name,"my name is Python") #print Hello",name,"my name
is Python