Dark_characters = {"Martha":[20,37,51], "Noah":[15,35,41], "Agnes":[9,37,38], "Jonas":[3,26,25], "Michael Your work is to find out the summation of all the values (given in list format). Then, take an input from the user (value from 1-10). If the input given by the user is even, then print all the even sum in a list. Also, print the corresponding character names. Otherwise, print all the odd sum
Dark_characters = {"Martha":[20,37,51], "Noah":[15,35,41], "Agnes":[9,37,38], "Jonas":[3,26,25], "Michael Your work is to find out the summation of all the values (given in list format). Then, take an input from the user (value from 1-10). If the input given by the user is even, then print all the even sum in a list. Also, print the corresponding character names. Otherwise, print all the odd sum
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
write it in python.
![Imagine you have the following dictionary. Just copy the dictionary from
the question to your
editor.
Dark_characters =
%3D
{"Martha":[20,37,51], "Noah":[15,35,41], "Agnes":[9,37,38], "Jonas":[3,26,25], "Michael":[25,50,48]}
Your work is to find out the summation of all the values (given in list
format). Then, take an input from the user (value from 1-10). If the input
given by the user is even, then print all the even sum in a list. Also,
print the corresponding character names. Otherwise, print all the odd sum
in a list along with another list containing corresponding character names.
Sample input 1:
1
Sample output 1:
The list of the odd sum is: [91, 123]
The list of the names is: ["Noah"," Michael"]
Explanation 1:
Here the user input is an odd number. So, the list contains all the odd
sums: 15+35+40=91; 25+50+48=123. The names of these corresponding sums are
Noah and Michael.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe4ceeb06-0ec1-4f20-96a4-62feaffcfd6f%2F3d23f04e-3cb9-42c9-8d82-41fd523b72f4%2Fpbrwc68_processed.png&w=3840&q=75)
Transcribed Image Text:Imagine you have the following dictionary. Just copy the dictionary from
the question to your
editor.
Dark_characters =
%3D
{"Martha":[20,37,51], "Noah":[15,35,41], "Agnes":[9,37,38], "Jonas":[3,26,25], "Michael":[25,50,48]}
Your work is to find out the summation of all the values (given in list
format). Then, take an input from the user (value from 1-10). If the input
given by the user is even, then print all the even sum in a list. Also,
print the corresponding character names. Otherwise, print all the odd sum
in a list along with another list containing corresponding character names.
Sample input 1:
1
Sample output 1:
The list of the odd sum is: [91, 123]
The list of the names is: ["Noah"," Michael"]
Explanation 1:
Here the user input is an odd number. So, the list contains all the odd
sums: 15+35+40=91; 25+50+48=123. The names of these corresponding sums are
Noah and Michael.
![Sample input 2:
10
Sample output 2:
The list of the even sum is: [108, 84,54]
The list of the names is: ["Martha"," Agnes", “Jonas"]
Explanation 2:
Here the user input is an even number. So, the list contains all the even
sum: 20+37+51=108; 9+37+38=84; 3+26+25=54. The names of these corresponding
sums are Martha, Agnes and Jonas.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe4ceeb06-0ec1-4f20-96a4-62feaffcfd6f%2F3d23f04e-3cb9-42c9-8d82-41fd523b72f4%2Fejrdhh_processed.png&w=3840&q=75)
Transcribed Image Text:Sample input 2:
10
Sample output 2:
The list of the even sum is: [108, 84,54]
The list of the names is: ["Martha"," Agnes", “Jonas"]
Explanation 2:
Here the user input is an even number. So, the list contains all the even
sum: 20+37+51=108; 9+37+38=84; 3+26+25=54. The names of these corresponding
sums are Martha, Agnes and Jonas.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education