Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a program in python, working on file access method in Python def function. HW15 How many new employee records do you want to create?
write a program in python, working on file access method in Python def function.
HW15 How many new employee records do you want to create? 5 Enter data for employee #1 Name: Easton ID number: 123 Department: Sales Enter data for employee #2 Name: Terry ID number: 456 Department: USA president Enter data for employee 13 Name: Sophia ID number: 789 Department: News Enter data for employee #4 Name: Alex ID number: 111 Department: idk Enter data for employee 15 Name: Camille ID number: 222 Department: Software development Write a program that asks the user for the name of a file. The program should display only the first five lines of the file's contents. (Of course, you should have the txt file exists) Assume that a file containing a series of names (as strings) is named names.txt and exists on the computer's disk. Write a program that displays the number of names that are stored in the file. (Hint: Open the file and read every string stored in it. Use a variable to keep a count of the number of items that are read from the file.)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