subject
Computers and Technology, 24.03.2021 18:00 giovney

Given two files named exactly "data1.txt" and "data2.txt" (no error checking needed) of names and scores print out the combined scores in alphabetical order by name. Note that the files will be formatted the same, but some names will be in both files and some names will only be in one file. For names in both files the scores need to be summed. The file format will be one header line followed by lines that have a name (string) and a number (int) separated by some unknown number of spaces. For output use this format string "{:10s} {:<10d}" Requirements:
(1) You must use a dictionary.
(2) You must use at least two functions that have a dictionary as an argument, e. g. read a file, print results.
For example, if data1.txt contains
Name Score
Joe 20
Mary 70
Rich 50
Jose 90
and data2.txt contains
Name Score
Sarah 80
Ming 20
Joe 65
Rich 30
The output will be:.
Name Total
Joe 85
Jose 90
Mary 70
Ming 20
Rich 80
Sarah 80
The program should be in Python...

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:00, 420420blazee
Are special characters that allow you to search for multiple words at the same time.
Answers: 2
image
Computers and Technology, 22.06.2019 22:00, robert7248
Competent nonverbal communication involves interacting with others in a manner that is appropriate for which of the following? select all that apply. situation task individuals
Answers: 3
image
Computers and Technology, 23.06.2019 03:00, Julianhooks
State 7 common key's for every keyboard
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, ryleerose255
Idon’t understand the double8 coding problem. it is java
Answers: 1
You know the right answer?
Given two files named exactly "data1.txt" and "data2.txt" (no error checking needed) of names and sc...

Questions in other subjects:

Konu
Mathematics, 21.09.2021 09:30