Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code using Python - Jupiter Notebook Write a code that asks the user to enter their name, and their nationality (English(En), French (Fr), German (De),
Code using Python - Jupiter Notebook
Write a code that asks the user to enter their name, and their nationality (English(En), French (Fr), German (De), Spanish (Esp), Italian (Ita)). Then greet the user with the a personalized message based on the their first language. English (En): "Good morning, [name]!" French (Fr) : "Bonjour, [name]!" German (De) : "Guten Morgen, [name]!" Spanish (Esp): "Buenos dias, [name]!" Italien (it) : "Buongiotno, [name]!" where [name] is a place holder for the name the user has entered. For other languages not in the list, use English as the default language. In [ ]: M \# write your code here: Q5. (1 point) An Armstrong number is a number that is the sum of its own digits each raised to the power of the digit number. For example,153 is an Armstrong number: st:8888otebooks/Downloads/523_HW3.ipynb , 11:04 PM \[ \begin{array}{l} \text { 523_HW3 - Jupyter Notebook } \\ 153=1^{3}+5^{3}+3^{3} \end{array} \] Write a code that asks the user to provide a three-digit integer, then check whether the number is an Armstrong number. Hint: 153, 370, 371, 407 are Armstrong numbers. You need to convert the input integer to string characters, then sperate each number, and then convert it back to integer and take to the power of 3 . For instance, if x is the integer provided by the user, use the following equation to find sum of digits raised to the power of the digit number. int(str(x)[0])len(str(x))+int(str(x)[1])len(str(x))+Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started