Write a Python program ex11.py to print a CSV file named ex11record.csv, add a new line, and print the content of the up
Posted: Sat Nov 27, 2021 10:36 am
Write a Python program ex11.py to print a CSV file named ex11record.csv, add a new line, and print the content of the updated file. Note that your program should be able to update the "SN" field automatically. ex11record.csv X III 1 to 3 of 3 entries Filter Address NT SN Name 1 Michael 2 Jack 3 Mary Show 10 per page KLN HK Figure 1: Original exllrecord.csv. ex11record.csv X III SN 1 1 to 4 of 4 entries Filter Address NT KLN HK Name Michael Jack Mary Tom 2 3 4 KLN Show 10 per page Figure 2: Expected content in updated exllrecord.csv., after the user is asked to input name as "Tom" and address as "KLN". Note that Tom's SN is 4. Test your programme with the following steps. Note the changes of SN field. Step 1: This is the original file. ['SN', 'Name' Address'] ['1', 'Michael', 'NT'] ['2', 'Jack', 'KLN'] ['3', 'Mary', 'HK'] Please input a new name (e.g. Tom) : Tom Please input a new address (e.g. KLN):KLN This is the updated file. ('SN', 'Name', 'Address'] ['1', 'Michael', 'NT'] ['2', 'Jack', 'KEN'] ['3', 'Mary', 'HK'] ['4', 'Tom', 'KLN Step 2: This is the original file. ['SN', 'Name', 'Address'] i'l', 'Michael', 'NT'] ['2', 'Jack', 'KEN'] ['3', 'Mary', 'H'] ['4', 'Tom', 'KEN'] Please input a new name (eg. Tom): Jerry Please input a new address (e.g. KLN):NT This is the updated file. ['SN', 'Name', 'Address'] ['1', 'Michael', 'NT'] ['2', 'Jack', 'KLN'] ['3', 'Mary', 'HK'] ['4 Tom', 'KLN'] ('5', 'Jerry', 'NT'1