Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Must be in python Problem 3 Write a program with two functions: write_file and determine_major . The write_file function will accept a file name and

Must be in python

Problem 3

Write a program with two functions: write_file and determine_major. The write_file function will accept a file name and write the following data to that file.

INSY

350

MANA

256

FINA

120

ACCT

184

MARK

86

OPMA

50

The determine_major function will accept a file name and a major and return the major and the number of students in that major.

Sample input/output:

What major: INSY

Major INSY has 350 majors

What major: MARK

Major MARK has 86 majors

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

Students also viewed these Databases questions

Question

Which budget must be prepared before the others? Why?

Answered: 1 week ago