Exam 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What CSS selector would style a tag that looks like this: < ... class="puppy"> .puppy { ... _puppy { ... puppy !important { ... puppy { ... %puppy { ...

.puppy { ...

What is the purpose of the admin site in a Django project? A site that lets you add, change, and delete data items A site that makes sure all of the software is always the latest version A site that tracks user activity A site the checks to see if your server is using too many resources

A site that lets you add, change, and delete data items

What do you put at the beginning of an HTML file to inform the browser which variant of HTML you will be using in this document? DOCTYPE <meta type> <html> <xs:sequence> <?xml version> <body>

DOCTYPE

DBA stands for [_____]

Database Administrator

Which keyword is used to add conditions to your query? IF SELECT WHERE ONLYIF

WHERE

Which of the following Django commands actually modify the database schema? updateschema makemigrations migrate check runserver

migrate

Which command do you use to exit the SQLite comand line tool? grep quit() return .quit

.quit

Why is there more than one font listed in the following CSS rule? body { font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; } This is a syntax error, the rule should start with "font-name" This is a syntax error, square braces [ ] should be used for the CSS rule They are the preferred fonts for Windows, Mac, Linux, and "Other" systems They are listed in descending preference order if fonts are not present in the browser

They are listed in descending preference order if fonts are not present in the browser

What can you do in the Django Shell that you can't do in the Python Shell? Use the print() function check the syntax of a Python command write a for loop Access a Django model

Access a Django model

Which of the following statements are true? An "id" attribute should only be used once in an HTML file A "class" attribute can be used many times in an HTML file It is recommended to use an "id" attribute many times in an HTML file A "class" attribute can only be used once in an HTML file A tag can only have a "class" attribute or an "id" attribute but not both

An "id" attribute should only be used once in an HTML file A "class" attribute can be used many times in an HTML file

What is the purpose of the models.py file? To connect your database to the Django addministration interface To apply a regular expression to the incoming path in the request oobect To make building views for your application simpler To define the shape of the data objects to be stored in a database

To define the shape of the data objects to be stored in a database

In the mysite/urls.py file, what is the basic idea of "include"? To make it easy to plug-and-play URLs To pull in commonly used HTML material To properly install django and all its dependencies To apply a regular expression to the incoming path in the request oobect

To make it easy to plug-and-play URLs

"INSERT INTO" is the keyword used to insert data into tables. True False

True

The LIMIT clause helps to narrow down the number of rows returned by the query. True False

True

Which of the following is not a way to include CSS in an HTML page? Using the <style> tag inline in the HTML document Directly on an HTML tag using the style= attribute Using the <font> tag to enclose other tags External Style Sheet

Using the <font> tag to enclose other tags

What organization is responsibile for standards for HTML and the web. NCSA CERN World Wide Web Consortium HTMLco.com Unesco

World Wide Web Consortium

What does the "b" in "bash shell" stand for? Bond (James Bond) Bourne Bivalve Conch Best

Bourne

What does the "python manage.py migrate" command do? Builds/updates the database structure for the project Moves login sessions to the backing store Makes a backup copy of db.sqlite3 Moves the application to a new server

Builds/updates the database structure for the project

A primary key can be set to null. True False

False

Images, PDF, movies cannot be stored in a database. True False

False

In the bash shell, what is the tab used for? Scrolling up and down while reading an online manual page Scolling up and down in commands you previously typed Logging out File and folder completion

File and folder completion

The Linux command to search files for a particular string is "grep". What does "grep" stand for? General Regular Expression Parser GReat Expression Printer Global Regular Expression Print Go Research Explore Print

Global Regular Expression Print

What does it mean when you see the "..." command in the command line interface? You are writing a multi-line Python statement Python is waiting for a semicolon You have switched from Python to SQL You can enter more than one Linux command to be executed simultaneously

You are writing a multi-line Python statement

What file in a Django application do you edit to make sure a model appears in the admin interface? module.py views.py sakaiger.py admin.py

admin.py

In HTML, what attribute is used to indicate text that will be shown if an image is not loaded or read to a user that is using a screen reader? [_____]

alt

What is the django command to reset the password for the admin user? runserver shell check changepassword

changepassword

What is the django command to create a user/password for the admin user interface? //SYSIN DD USER createsuperuser MOVE CORRESPONDING INTO USER INSERT INTO User;

createsuperuser

What is the preferred tag in modern HTML to indicate that text is to be shown in italics format? italics em span i <xs:italics>

em

Which of these CSS rules make text appear in a bold face font? strong: yes font-bold: on font-style: bold font-weight: bold font-expand: 10%

font-weight: bold

Primary keys are used to distinguish rows within in a table. [_____] keys are used to reference the primary key from a different table.

foreign

Which CSS selector controls how a link (anchor tag) looks while the user mouses over the link (i.e. while hovering)? [_____]

hover

Which is the correct ordering of opening tags in a well formed html document? html head title body h1 h1 body title head html title head html body h1 body html h1 head title

html head title body h1

What is the HTML tag for an item in a bulletted list? item list:item bullet tag li

li

What tag is used to import a style sheet into an HTML document? [_____]

link

Which of the following Django commands actually write Python code based on your models.py file? makemigrations check migrate updateschema runserver

makemigrations

Which of the following CSS selectors is between the content area and the border? (CSS box model) perimeter margin padding pixels edge

padding

These questions come from the Django project tutorial materials. What is the name of the application we build in step 1 of "Writing your first Django app, part 1"? autos cats blog dogs polls

polls

What command do we run on PythonAnywhere instead of "python manage.py runserver"? python manage.py paw_restart python startapp polls python manage.py migrate - and then set the virtual environment python manage.py check - and then reload the web application

python manage.py check - and then reload the web application

What command is used to add a new application to a Django project? python manage.py create python manage.py startapp python manage.py new python manage.py build

python manage.py startapp

Which command do you use to exit the Django Shell? quit() grep return .quit

quit()

Which of the following commands will exit the Python Shell? .quit grep quit() return

quit()

Which of these is a reserved word in the SQL (database) language? print grep select return

select

What character is the SQLite command line tool looking for when you see the '...>' prompt? asterisk period pound sign semicolon

semicolon

What file contains the list of INSTALLED_APPS in a Django project? apps.py manage.py settings.py urls.py views.py

settings.py

Which HTML tag does nothing to the text it surrounds and has as its sole purpose to create a "handle" so as to be able to apply CSS to the text. [_____]

span

These questions come from the Django project tutorial materials. What is the default database backend for Django projects when they are first set up. sqlite3 Oracle MongoDB PostgreSQL MySQL

sqlite3

What is the preferred tag in modern HTML to indicate that text is to be shown in bold format? strong span bold <xs:bold> b

strong

What is the tag that is used in a document's <head> area to set the text shown in the tab of the browser or title bar? [_____]

title

What CSS rule allows you include a tag in markup but hide it from view in the browser? font-size: -1px; visibility: hidden; display: block; status: off; right: 0;

visibility: hidden;

Which of these commands must be typed when you start a new shell to activate your virtual environment to make sure you have the correct versions of Python and Django. cd ls grep workon django4

workon django4

What does the __str__ method in a Django model accomplish? It indicates how strict the storage model will be in terms of column length It improves the strength of the binding between SQL and the model It lets you specfiy how an instance of the model will be represented as a string It determines how the model will respond to stress

It lets you specfiy how an instance of the model will be represented as a string

What is the most commonly used operating system for production servers in the cloud. DEC VMS Windows MS/DOS Linux MacOS

Linux

What operating system are you using in PythonAnywhere when you open a Bash shell? MacOS Linux Windows DEC VMS MS/DOS

Linux

Which command prompt generally ends in dollar sign ($)? SQLite interface Django shell Linux shell Python shell

Linux shell

Which keyword will cause the results of the query to be displayed in sorted order? WHERE None of these ORDER BY GROUP BY

ORDER BY

Which command prompt uses three chevrons (>>>)? Linux shell Python shell SQLite interface Mongo shell

Python shell

Which command is used to retrieve all records from the table? SELECT all FROM Users SELECT * FROM Users RETRIVE all FROM Users RETRIVE * FROM Users

SELECT * FROM Users

In the bash shell, what are the arrow keys used for? Scolling up and down in commands you previously typed File and folder completion Logging out Scrolling up and down while reading an online manual page

Scolling up and down in commands you previously typed

What is the answer to life the universe and everything? xyzzy 42 iddqd BSXSGGC plugh

42

What is the start of an HTML comment? <!-- # ''' /*

<!--

Structured Query Language (SQL) is used to (check all that apply) Insert data Run python Delete data Create a table

Insert data Delete data Create a table

For the following HTML, which description of the "style=" attribute is most accurate? <p style="color: red;"> It changes the color of the tab for this page in the browser to be red It changes the background color of the paragraph to red It allows the application of the specified CSS rule to the content of the paragraph It contains JavaScript to be executed when the user's mouse hovers over the paragraph It is an HTML syntax error and will be ignored

It allows the application of the specified CSS rule to the content of the paragraph

What does the "sqlmigrate" option accomplish in a Django application? It moves all of your non-SQL data into flat files It builds/updates the database structure for the project It lets you see the SQL that will run to effect a migration It copys all of your SQL in to a REST based API

It lets you see the SQL that will run to effect a migration

What is the difference between the Django shell and a normal interactive Python shell? Only the Python shell can print values The Django shell loads all of the project objects before starting The Django shell uses Javascript instead of Python You can run Django commands in a Python shell

The Django shell loads all of the project objects before starting

What is true about the following HMTL? <a href="http://www.dr-chuck.com/page2.htm">Second Page</a> - The text "Second Page" is improperly placed and will not be seen - The reference is a relative reference - The reference is an absolute reference - The HTML is improperly formed and there will be a syntax error

The reference is an absolute reference


Set pelajaran terkait

anatomy lower limb muscle review

View Set

Analogy in Literature: Definition & Examples

View Set

Chapter 16- Protestant Reformation

View Set

Ch 6: Basic Catalyst Switch Operations

View Set

Enterprise Networking, Security, and Automation (Version 7.00) - WAN Concepts Exam

View Set

ATI - Neurological Systems Part 2

View Set