Define a function that takes an sqlite database filename DBf…
Define a function that takes an sqlite database filename DBfile, a list of strings DBkeys, and a list of int DBvals.The function performs the following: Connect to the database file which name is the parameter of the function. Assume the filename is valid. The data in the lists must be saved into a table named tableA. The lists are synced, so the first entry in DBkeys is associated with the first entry of the DBvals. Create the table tableA which would have a string field, and an integer field. Their value comes from the DBkeys and DBvals respectively. Using one SQL command, (i.e. no loop) display the total of all the int values. Once done, show the total number of changes made using a sqlite function. Ensure to apply all the changes and close all open connections. If all the above goes through return True, otherwise if a runtime error occurs, return False.
Read DetailsDefine a function that receives an sqlite database file name…
Define a function that receives an sqlite database file name and performs the following: Connect to the database file provided – assuming it exists as needed to do the rest of the items below. No need to account for cases where the file name provided is invalid. Read all the records of a table named mystery. Save those records into a list of dictionary type. The first field of the record is a string. That should be the key. The remaining values are three integers and should be added as the values of that key in a list of int. Close all connections. Return the dictionary list.
Read DetailsDefine a python function that gets two lists and returns a l…
Define a python function that gets two lists and returns a line chart plot where the x-axis is the first list items and the y-axis is the second list items. Set the x and y axes titles as “x-axis” and “y-axis” then use the rest of the list data to create the plot object. Do not set any other properties of the plot. Return the plot object.
Read Details