Question

In: Computer Science

In PYTHON OF JUPIDER NOTEBOOK Write a program that prompts the user to enter his/her nationality...

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!

Solutions

Expert Solution

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


Related Solutions

Write a program In python of Jupiter notebook (using loops) that prompts the user to enter...
Write a program In python of Jupiter notebook (using loops) that prompts the user to enter his/her favorite English saying, then counts the number of vowels in that (note that the user may type the saying using any combination of upper or lower case letters). Example: Enter your favorite English saying: Actions speak LOUDER than words. Number of wovels: 10
Write a Python program that prompts the user to enter a list of words and stores...
Write a Python program that prompts the user to enter a list of words and stores in a list only those words whose first letter occurs again within the word (for example, 'Baboon'). The program should display the resulting list..................please explain step by step
Write a program function code in Python that prompts the user to enter the total of...
Write a program function code in Python that prompts the user to enter the total of his/her purchase and add 5% as the VAT. The program should display the total without and with VAT. ( that mean i should ask the user to enter the number of their item " so i think that i should use range" then print the result with and without the VAT )
USE PYTHON. Write a program that prompts the user to enter 5 test scores. The program...
USE PYTHON. Write a program that prompts the user to enter 5 test scores. The program should display a letter grade for each score and the average test score. Hint: Declare local variables under main() program Prompts the user to enter 5 test scores Define a function to calculate the average score: this should accept 5 test scores as argument and return the avg Define a function to determine the letter grade: this should accept a test score as argument...
python programming. Write a program that prompts the user to enter an integer from 0 to...
python programming. Write a program that prompts the user to enter an integer from 0 to 9. The program will check if the input is a positive integer. It displays the correct answer and shows the guess is correct or not. The demos are shown as following.(Hint:1. Use a random math function 2. Use str.isdigit() to check the input)
Write a Python program using functions and mainline logic which prompts the user to enter a...
Write a Python program using functions and mainline logic which prompts the user to enter a number, then generates that number of random integers and stores them in a file. It should then display the following data to back to the user: The list of integers The lowest number in the list The highest number in the list The total sum of all the numbers in the list The average number in the list At a minimum, the numbers should...
Write a PYTHON program that prompts the user to enter the account’s present value, yearly interest...
Write a PYTHON program that prompts the user to enter the account’s present value, yearly interest rate, and the number of years that the money will be left in the account. The program should pass these values to a function that returns the future value of the account, after the specified number of months. The program should display the accounts’ future value
Write a program(Python) using functions and mainline logic which prompts the user to enter a number....
Write a program(Python) using functions and mainline logic which prompts the user to enter a number. The number must be at least 5 and at most 20. (In other words, between 5 and 20, inclusive.) The program then generates that number of random integers and stores them in a list. The random integers should range from 0 to 100. It should then display the following data to back to the user with appropriate labels: The list of integers The lowest...
python.Write a python program that prompts the user to enter the year and first day of...
python.Write a python program that prompts the user to enter the year and first day of the year, and displays the first day of each month in the year. For example, if the user entered the year 2020 and 3 for Wednesday, January 1, 2020, your program should display the following output: January 1, 2020 is Wednesday February 1, 2020 is Saturday …… December 1, 2020 is Tuesday
Write a java program that prompts user to enter his name and KSU ID using format...
Write a java program that prompts user to enter his name and KSU ID using format name-ID as one value, his gender as char, and his GPA out of 5. Then your program should do the following: Print whether the ID is valid or not, where a valid ID should be of length = 9, and should start with 4. Calculate the GPA out of 100 which is calculated as follows GPA/5 * 100. Update the name after converting the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT