si 364 quizzes

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

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

.puppy { ...

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

.quit

What port is used for Simple Mail Transfer Protocol (SMTP)? 420 142 80 119 25

25

What is the default port for secured (https) connections to a web server? 43 3 243 8443 443

443

What port is used by default for Secure HTTP (https)? 119 443 142 80 25

443

What is the default port for the non-secure HTTP (web server) protocol? 8000 8 80 8080 800

80

When a browser connects to a web server to retrieve a document, what is the default TCP/IP port that is used? 142 25 420 119 80

80

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

<!--

What must happen before a client can open a socket? The client must be in the same folder as the server The client must be on the same system as the server A server must be running that is listening for socket connections The client must create a local file with the same name as the socket The server must allocate sufficient memory to handle any needed retransmissions

A server must be running that is listening for socket connections

What is the purpose of the admin site in a Django project? 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 A site that makes sure all of the software is always the latest version

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

In Python, what is the difference between an open file and a socket? When you open a file you get a read and write handle to allow simultaneous operations The program can rewind a socket and start writing again at the beginning of the socket The a program writes to a socket, it can read its data back after closing the socket A socket can be simultaneously read and written

A socket can be simultaneously read and written

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

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 only be used once in an HTML file A tag can only have a "class" attribute or an "id" attribute but not both It is recommended to use an "id" attribute many times in an HTML file A "class" attribute can be used many times in an HTML file

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

These questions come from the Django project tutorial materials. When you see a path with the following pattern in urls.py, path('<int:question_id>/', views.detail, name='detail'), where in the code does the question_id value parsed from the URL end up? As part of the database connection used by the model As an additional parameter to the detail() view As a global variable in views.py In the cookies structure In the context that is passed to the render engine

As an additional parameter to the detail() view

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

Bourne

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

Builds/updates the database structure for the project

Which of the HTTP headers does the browser look at to decide how to display the retrieved document? Format ETAG Display-type Content-length Location Content-type

Content-type

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

DBA stands for [_____]

Database Administrator

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

Delete data Create a table Insert data

What does the built-in Django template tag "lorem" do? Returns true if there are learning objects on the page Displays random "lorem ipsum" Latin text. Displays the overall number of learning objects Displays the number of remaining learning objects

Displays random "lorem ipsum" Latin text.

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? Logging out Scrolling up and down while reading an online manual page Scolling up and down in commands you previously typed File and folder completion

File and folder completion

When a browser connects to a web server to retrieve a document, what command is sent to the server? GET POST DELE PUT

GET

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

Global Regular Expression Print

Which of these might you find in the View of a Django MVC application? SQL HTML PHP Python

HTML

Which of the following is typically the first task when handing an incoming HTTP request in web server code? Handle check the input data Retrieve any need data for the View Produce and return the HTTP Response Store the input data

Handle check the input data

What standards organization publishes many of the documents that describe the protocols we use on the Internet? Educause IRR IETF 6-Sigma RIA

IETF

What kind of data is passed into a view in the 'request' object? All of the global Python variables All the possible combinations of context variables Information about the incoming HTTP request from the browser A list of all the models available to the application

Information about the incoming HTTP request from the browser

For the following HTML, which description of the "style=" attribute is most accurate? <p style="color: red;"> It allows the application of the specified CSS rule to the content of the paragraph It changes the background color of the paragraph to red 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 changes the color of the tab for this page in the browser to be red

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 builds/updates the database structure for the project It moves all of your non-SQL data into flat files 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

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

What does the __str__ method in a Django model accomplish? It improves the strength of the binding between SQL and the model 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 It indicates how strict the storage model will be in terms of column length

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. MacOS MS/DOS Windows Linux DEC VMS

Linux

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

Linux

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

Linux shell

What does the built-in Django template filter "safe" do? Exits the tempate processing and ignores the rest of the template Marks a string as not requiring further HTML escaping prior to output Locks the next HTML tag so it cannot be modified in a browser debugger Marks a string as requiring HTML escaping prior to output

Marks a string as not requiring further HTML escaping prior to output

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

ORDER BY

Which of the following is NOT part of a Uniform Resource Locator: Host Protocol Operating System Document

Operating System

Which of these might you find in the Controller of a Django MVC application? HTML SQL PHP Python

Python

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

Python shell

How do indicate that a particular question cannot be found in a detail view? Send back an HttpResponse with the text 'not found' Raide an Http500 exception Raise an Http404 exception Send back a blank page

Raise an Http404 exception

What does the built-in Django template tag "spaceless" do? Removes whitespace between HTML tags. Returns true if the text will fit in a smaller space Uses a smaller font so text fits into the available space Shows data with a dark blue background and white text

Removes whitespace between HTML tags.

What does the built-in Django template tag "url" do? Emits an anchor (a) tag in the HTML Encodes the provided string using the url encoding rules Checks if the provided string is a valid url Returns an absolute path reference matching a given view and optional parameters

Returns an absolute path reference matching a given view and optional parameters

What does the built-in Django template filter "length" do? Returns the length of a list but not the length of a string Returns the length of a string but not the length of a list Returns the length of a list or string Returns the number of characters produced by the template up to this point Returns the number of words in a string

Returns the length of a list or string

Which of the following SQL commands will be run by the Question.objects.values() statement in a view function? DELETE UPDATE INSERT SELECT

SELECT

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

SELECT * FROM Users

Which of these might you use to manually examine the contents of a Model in a Django MVC application? Python SQL HTML PHP

SQL

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

Scolling up and down in commands you previously typed

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

The Django shell loads all of the project objects before starting

What can't you see in the Browser Developer Mode for most browsers? The browser Document Object Model (DOM) The code that runs in the server The HTTP response code (like 200 or 404) for each request The request and response headers for retrieved documents

The code that runs in the server

What does the Django built-in template tag forloop.counter represent in a Django template? The number of iterations from the end of the loop (1-indexed) The current iteration of the loop (1-indexed) The number of iterations from the end of the loop (0-indexed) The current iteration of the loop (0-indexed)

The current iteration of the loop (1-indexed)

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

The reference is an absolute reference

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

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

What is the purpose of encode() in the socket1.py code: To make sure that the we server properly recognizes the GET verb To break the data into packets for network transmission To convert the data to UTF-8 before sending To check if there is any data ready to send

To convert the data to UTF-8 before sending

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 apply a regular expression to the incoming path in the request oobect To pull in commonly used HTML material To make it easy to plug-and-play URLs To properly install django and all its dependencies

To make it easy to plug-and-play URLs

What does the second "T" of HTTP stand for? Transpose movemenT Transfer Transport

Transfer

"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 <font> tag to enclose other tags Directly on an HTML tag using the style= attribute Using the <style> tag inline in the HTML document External Style Sheet

Using the <font> tag to enclose other tags

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

Where

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

World Wide Web Consortium

What does it mean when you see the "..." command in the command line interface? Python is waiting for a semicolon You are writing a multi-line Python statement 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

Which HTML tag typically generates a request to retrieve a document form the server when it is clicked? div b p h1 a img

a

What file in a Django application do you edit to make sure a model appears in the admin interface? admin.py sakaiger.py module.py views.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

In the sample server.py code, which function call will fail if another application is already using a port? listen() socket() decode() recv() bind()

bind()

What built-in Django template filter capitalizes the first character of the value? capfirst toUCFirst ucfirst toupper

cap first

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

changepassword

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

createsuperuser

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

em

Which of these CSS rules make text appear in a bold face font? font-weight: bold strong: yes font-bold: on font-style: 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 key

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? h1 body title head html title head html body h1 body html h1 head title html head title body h1

html head title body h1

Which file represents the "Controller" aspect of a Django application? It is complicated models.py views.py forms.py

it is complicated

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

li

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

link

In the sample server.py code, which function call actually waits for incoming socket connection requests? socket() listen() bind() recv() decode()

listen()

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

makemigrations

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

migrate

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

padding

What command do we run on PythonAnywhere instead of "python manage.py runserver"? python manage.py migrate - and then set the virtual environment python startapp polls python manage.py paw_restart 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 startapp python manage.py build python manage.py create python manage.py new

python manage.py startapp

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

quit()

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

quit()

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

select

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

semicolon

What file contains the list of INSTALLED_APPS in a Django project? settings.py urls.py manage.py apps.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. MongoDB PostgreSQL MySQL Oracle sqlite3

sqlite3

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

strong

Which of the following files in a Django application most closely captures the notion of "View"? templates/polls/main.html views.py urls.py models.py forms.py

templates/polls/main.html

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

Which of the Python libraries makes it very easy to make HTTP requests from Python? decode json re urllib

url lib

Which of the following files does Django consult first when it receives an incoming HTTP Request? models.py templates/polls/main.html urls.py views.py forms.py

urls.py

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

visibility: hidden;

What is the built-in Django template filter to count the number of words in a string?

wordcount

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. workon django4 cd ls grep

workon django4


संबंधित स्टडी सेट्स

AP Phys C 2nd half fall exam review

View Set

Microsoft Word Chapter 3 and 4 Test

View Set

MACRO Test #3 (Homework 10, 12, 13)

View Set

General Science ASVAB Practice Test

View Set

NASM Section 3 Human Movement Science

View Set

ASSESSMENT AND MANAGEMENT OF HTN (CH 27) PREPU

View Set