July 2022 Computing programming course by Teesside University
Worksheet 4: File I/O
[ASSESSMENT] Question 4: Splitting the Car Database (splitting_cars.txt) Write a program which splits the car database from question 3 into smaller files.
- Write a script that will read in the car database used in question 3 and write out 3 files named as make_model_year.txt containing information about one car only. For example, mitsubishi_outlander_2015.txt should contain: Mitsubishi Outlander 2015
- Now add another car to the original file and run your program again. The program should still work as expected, producing 4 files this time instead of 3. If it does not do this, modify it so that it does.