Question: 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
Get step-by-step solutions from verified subject matter experts
