Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please solve it as soon as possible by using python 3 code. only one house left .help me. Take two lists from the user (elements
please solve it as soon as possible by using python 3 code. only one house left .help me.
Take two lists from the user (elements of the lists separated by space) of the same size. The first list will contain some names and the second list will contain roll numbers. Your job is to assign each name a roll number from the list containing numbers following the criteria given below: Find the sum of the ASCII value of each name and then sort the names in descending order based on the sum. Then assign the lowest number to the name that has the highest ASCII value sum as a roll number. Sample Input 1: Alan Jack Nancy Jim 10 15 20 50 Sample Output 1: Nancy's roll number is: 10 Alan's roll number is: 15 Jack's roll number is: 20 Jim's roll number is: 50 Explanation1: Here, the summation of the ASCII value of each name are: Nancy(505), Alan (380), Jack(377) and Jim(288). So, Nancy got the lowest number (10) from the number list as roll number, then Alan got the second lowest (15), followed by Jack(20) and Jim (50)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