import mysql.connector # connect to our server with username "sosviewer" and password "notsecret": cnx = mysql.connector.connect(user='sosviewer', password='notsecret', host='thebe.virtual.gac.edu', database='sos') # You need to put here the code to retrieve the information # and print it out, using the MySQL connection named cnx, similarly # to the example worked in class. # # I suggest you start with printing one line per candidate # for a U.S. office, showing the office title and party # abbreviation retrieved from the sos.candidates table. # # Then once that works, you can make a fancier version in which # each office is shown on a line with a comma-separated list # of party abbreviations. cnx.close()