Question
Write a Python program, in a file called robots.py, to solve the following problem: Each robot model for a company is designed and created by
Write a Python program, in a file called robots.py, to solve the following problem: Each robot model for a company is designed and created by a single engineer whose nickname is used as the name of their robot; the robot model number is derived using a series of steps. Given the nickname, age (as an integer) and years of service (as a float value) of an engineer, generate the model number for the robot created by that engineer as follows: extract the first and the last character from the engineer's nickname and convert the first extracted character to lower case and the last extracted character to upper case to form a string of three characters which includes a # concatenated at the end compute the sum of the years of service and age and multiply that sum by 5, then convert it to an integer (by truncation, not rounding)
generate the complete model number as a string by joining the digits of the sum with the reverse of the digits of the sum and repeating the string thus formed, twice; concatenate this string of digits after the string of three characters described above Your Python code should ask the user for the require information and compute and display the robot's name and model number. For example, the input prompts, input (shown in bold blue) and corresponding output from the program could be as follows: Enter the engineer's nickname: Robotdoc Enter the engineer's age: 45 Enter engineer's years of service: 12.5 The robot Robotdoc has model number rC#287782287782
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