Challenge

Project 2

4]#Display first 1000 rows of tables (College_A_HS, College_A_SE, College_A_SJ, College_B_HS, College_B_SE, College_B_SJ) with #Python. import mysql.connector testdb =mysql.connector.connect( host = "localhost", user = "root", password = "Use Your Mysql Password", database = "alumni") display = testdb.cursor() A_HS = "SELECT * FROM college_a_hs LIMIT 1000" A_SE = "SELECT * FROM college_a_se LIMIT 1000" A_Sj = "SELECT * FROM college_a_sj LIMIT 1000" B_HS = "SELECT * FROM college_b_hs LIMIT 1000" B_SE = "SELECT * FROM college_b_se LIMIT 1000" B_Sj = "SELECT * FROM college_b_sj LIMIT 1000" display.execute(A_HS) for a in display: print(a) display.execute(A_SE) for b in display: print(b) display.execute(A_Sj) for c in display: print(c) display.execute(B_HS) for d in display: print(d) display.execute(B_SE) for e in display: print(e) display.execute(B_Sj) for f in display: print(f)

5]

(Same procedure for all other columns)

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.