Question types

MYSQL with Python Interface question types

43 questions across 5 question groups — pick any mix to generate a Computer Science paper with step-by-step answer keys.

43
Questions
5
Question groups
5
Question types
Sample Questions

MYSQL with Python Interface questions

One sample from each question group in this chapter. Select any group above to see the full set with answer keys.

Q 1M.C.Q1 Mark
Data Error exception raised when:
  • A
    When no data exist.
  • B
    raised due to problems with the processed data
  • C
    When object unable to store the data returned by the cursor object,
  • numeric value out of range, or division by zero occur.

Answer: D.

View full solution
Q 4M.C.Q1 Mark
Complete the code:

  • A
    MySQLDB and connection
  • MySQLdb and connect
  • C
    MYSQL and connect
  • D
    MySQLdb and connector

Answer: B.

View full solution
Q 5M.C.Q1 Mark
Exception raised when the relational integrity of the database is affected in Python
  • A
    IntegrityFailError
  • IntegrityError
  • C
    IntegrityViolationError
  • D
    Integrityfatalerror

Answer: B.

View full solution
Q 132 Marks Each2 Marks
Write the python script to read the content from .csv file (Comma Seperated Values) i.e "Student.csv" and then transfer the content to the SQL Table.
View full solution
Q 152 Marks Each2 Marks
Write the python script to connect the database, i.e.test and create the table emp21 with the following field (empno,name and salary). Also, insert the row.
View full solution
Q 163 Marks Each3 Marks
Write the python function delete() to delete the record In the student table according to the employee number passed as parameter.
View full solution
Q 173 Marks Each3 Marks
Write the function to update() to accept the values as parameter and update the record according to the passed values. Assuming that values exist in the table.
View full solution
Q 193 Marks Each3 Marks
Write the python function to accept the employee name as parameter and find out whether record present in the table or not. (Assuming that table already exist)
View full solution
Q 214 Marks Each4 Marks
Write a menu driven program to do the following task:

1. Insert

2. Delete

3. Update

4. Display all

5. Search a Records

6. Create table

View full solution

Generate a MYSQL with Python Interface paper free

Pick question groups from the list above, set marks and difficulty, and export a branded PDF with step-by-step answer keys. First 3 chapters free — no signup.

Download App