Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program using Dictionaries in Python by tomorrow. Given two files named exactly datal.txt and data2.txt (no error checking needed) of names and scores

Write a program using Dictionaries in Python by tomorrow.image text in transcribedimage text in transcribed

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. 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. 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 datal.txt contains Score Name Joe 20 Mary 70 Rich 50 Jose 90 and data2.txt contains Score Name Sarah 80 Ming 20 Joe 65 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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions