inf551 database to the user see mysql connector slide Do not include create

Inf551 database to the user see mysql connector slide

This preview shows page 1 - 3 out of 3 pages.

“inf551” database to the user (see mysql connector slide). Do not include create table and grant privilege statements, which should be done separately , in your Python code other than insertion. Your script should obtain the database connection using the following call (same as that in the slide). cnx = mysql.connector.connect(user='inf551', password='inf551', host='127.0.0.1', database='inf551') Your script takes only one argument ( lax.json ): Execution: python load.py lax.json Submission: <FirstName>_<LastName>_load.py
Image of page 1
INF 551 – Spring 2017 b. [25 points] Write a Python script lax.py that takes two keywords (that specify the search condition) as the input, and outputs the total number of passengers in the records that satisfy the condition. The first keyword is either “ Departure ” or “ Arrival ”; the second is a four-digit year, e.g., 2006 . There’re only and always these two kind of keywords. For example, “ python lax.py Arrival 2015 ” will return the number of passengers that arrived in 2015.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 3 pages?

  • Fall '14
  • Tom Bradley International Terminal

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes