Question: PYTHON QUESTION 1 A row in a database table is called ____. a field a collection a record a tuple QUESTION 2 To prevent a
PYTHON
QUESTION 1
A row in a database table is called ____.
a field
a collection
a record
a tuple
QUESTION 2
To prevent a SQL-Injection attack you need to ____.
recast all data entered to type string
concatenate all entered data with quote marks
use parameterized queries
QUESTION 3
In order for a wxPython ListCtrl widget to display rows and columns of data we need to _____.
set the style argument in the constructor to wx.LC_REPORT
set the style argument in the constructor to wx.LC_TABLE
set the layout argument in the constructor to wx.LC_TABLE
set the layout argument in the constructor to wx.LC_REPORT
QUESTION 4
To set the range of possible number usable in a SpinCtrl, you use ____.
Range(a, b)
Values(a, b)
SetRange(a, b)
QUESTION 5
Which if the following is the bit-wise OR operator?
\
|
&
$
QUESTION 6
You can append a tuple containing a record to the list control using the append() method.
True
False
QUESTION 7
When adding a widget to a vertical box sizer, the EXPAND flag _____.
if persent, has the widget expand to take up the whole horizontal space minus any border.
makes every widget in the frame double in size.
if persent, has the widget expand relative to the stretch factor.
QUESTION 8
To remove all the rows in a wx.ListCtrl you'd execute ____.
self.list.DeleteAllItems()
self.list.DeleteAllRows()
self.list.DeleteAll()
self.list.RemoveAll()
QUESTION 9
When adding a widget to a box sizer, the border argument _____.
draws a dark-lined border around the widget 2 pixels thick by default.
determines the padding in pixels that is used to separate it from other widgets
draws a dark-lined border around the widget 1 pixels thick by default.
determines the padding in millimeters that is used to separate if from other widgets
QUESTION 10
You execute a query that gets all records from a table. the fetchall() method returns ____.
a CSV file of the table contents
a list containing one record where each field is a value in a tuple
a list of tuples where each tuple is a record in the table
a tuple of lists where each list is a column in the table
QUESTION 11
What SQL statement selects all the rows in a table?
SELECT ALL FROM addresses
SELECT * FROM addresses
SELECT state FROM addresses
QUESTION 12
A column in a database table is called _____.
a tuple
a record
a field
a collection
QUESTION 13
SQLITE3 _____.
runs on the computer's local file system
requires a separate service be running like MySql does
is a hierarchical database
is a much bigger program than MySql
QUESTION 14
You have a class named MyDialog that inherits from wx.Dialog. You also have a class named MyFrame that inherits from wx.Frame. MyFrame is intended to open the dialog box and retrieve a couple of user-entered values when the dialog closes. The MyDialog constructor is called from the Myframe instance by assigning the MyFrame instance to a variable named dataDlg. The following code is not complete but should show the relationship of the two classes.bclass
MyDialog(wx.Dialog):
pass class
MyFrame(wx.Frame):
def ....
dataDlg = MyDialog()
we say MyDialog has a MyFrame
We say MyDialog is a MyFrame
we say MyFrame is a MyDialog
we say MyFrame has a MyDialog
QUESTION 15
To successfully import a CSV file into a database table the table and its structure must exist in advance.
True
False
QUESTION 16
To insure that the resources of a dialog box are freed up after it closes, you need to execute the _____.
End method
Release method
Exit method
Destroy method
QUESTION 17
Box sizers can be ____ in orientation. Choose two answers.
layered
diagonal
vertical
horizontal
QUESTION 18
A table has 5 fields. Which of the following is a proper parameterized query?
INSERT INTO colors VALUES (param1, param2, param3)
INSERT INTO colors VALUES ( ?, ?)
INSERT INTO colors VALUES ('param1', 'param2', 'param3')
INSERT INTO colors VALUES (?, ?, ?, ?, ?)
QUESTION 19
This statement, c = sqlite3.connect('db3'). Choose 2 answers.
creates a database named db3 is it does not yet exist
opens the db3 database and creates a connection
creates a cursor for db3
deletes any existing db3 and creates a new empty database
QUESTION 20
If a row in a database table has a unique identifier, this identifier is called _____
a nullable key
an auto key
a primary key
a foreign key
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
