Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started