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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!