Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

data1.txt === http://www.cse.msu.edu/~cse231/Online/Labs/Lab09/data1.txt data2.txt === http://www.cse.msu.edu/~cse231/Online/Labs/Lab09/data2.txt IN Python B. Write a program using Dictionaries Given two files named exactly datal.txt and data2.txt (no error checking

image text in transcribed

image text in transcribed

data1.txt === http://www.cse.msu.edu/~cse231/Online/Labs/Lab09/data1.txt

data2.txt === http://www.cse.msu.edu/~cse231/Online/Labs/Lab09/data2.txt

IN Python

B. Write a program using Dictionaries Given two files named exactly "datal.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. Fornames 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. Requirements (1) You must use a dictionary. (2) You must use two functions that have a dictionary as an argument, e.g. read a file, print results. For example, if data1 contains Name Score 20 Joe Mary 70 Rich 50 Jose 90 and data2.txt contains Name Score Sarah 80 Ming 20 65 Oe Rich 30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions

Question

2. Why has the conflict escalated?

Answered: 1 week ago

Question

1. What might have led to the misinformation?

Answered: 1 week ago