Introduction
Assignment & Discussion
West Virginia Hot Dogs now has a consolidated employee list thanks to your efforts from PA 3. Now those employees need to be placed into the list of Current Employees, which is in CSV table format.
Your mission in this homework assignment is to create and manipulate CSV and JSON files. Remember to think what each task is trying to accomplish and break them down one at a time into the steps needed to achieve the tasks. Follow the Task list for best results.
Tasks
Write a Python 3 program to accomplish the following:
1. Remember from Chapter 9 (pp. 204-205) that given the pieces of a directory structure, Python can create the actual path name and help ensure the code runs on various machine types. Instead of a full hardcode of the path name, practice letting Python create the Desktop directory path before changing to the Desktop. That is, ensure the program’s current working directory is the Desktop by using the following code:
homeFolder = '/' # For Mac. If you use Windows, your homeFolder is # the Window’s root directory.
desktopPath = os.path.join (homeFolder, 'Users', yourUserDirectory, 'Desktop') os.chdir (desktopPath)
2. Create a new CSV file called CurrentEmpList. Assign the file name to a variable and then use the variable name thereafter.
3. Each row in this file should denote things: the employee’ name and job title. Employees from both work locations are in a consolidated file, WVDogsNewHires.txt.
- Read the list from the provided file, one line at a time.
- Pull each employee’s name and job title from the file. Split method may be useful.
- Place each each employee entry on a separate line in the CSV file.
Note: the first line in the file contains the column names, not employee information.
4. To verify the data wrote correctly, read the data from CurrentEmpList and print it to the screen.
Notes
5. WVHotDogs likes to keep track of the dates that each new employee list is created. In a separate file, store the date that the newly created CurrentEmpList was written. This should be a JSON file that contains a dictionary .
• Give the dictionary keys for Month, Day and Year.
• Also, provide associated values for each dictionary keys; they will represent today, e.g., June, 28, and 2021. Note: Remember the correct data type for each value.
o A little stretch: Consider using the datetime module (p. 395) to obtain today’s date.
- Follow the Sample Output for screen output and file content. These examples give you a good idea of what I’ll look for in your CSV and JSON files.
Requirements
□ Application
o Write your program in Python 3.
o Ensure you have written your pseudocode plan, named csv_json_opsPC_YourName.
o Ensure your file is named properly: csv_json_ops _YourName.py.
o If you choose to use a different file editor, note that I will run and evaluate your submissions in IDLE. If you write your code using another IDE, remember to run your finished program in IDLE to ensure no unfortunate surprises. If it doesn’t run in IDLE, it doesn’t run.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme