WorksheetsAdvanced Programming - (Pre-Test)
Total questions: 34
Worksheet time: 19mins
Which language describes the structure of web pages?
HTML
CSS
Python
JavaScript
Which language is used to enhance the visual appeal of a web page?
HTML
CSS
Bootstrap
Javascript
Which of the following is the correct syntax to add the external stylesheet in CSS?
<style src = quiz.css>
<style src = "quiz.css">
<stylesheet> quiz.css </stylesheet>
<link rel="stylesheet" href="quiz.css">
Which property lets you stop the background image from appearing as a grid?
background-color
background-size
background-repeat
background-cover
Which CSS property will you use to change the color of the text?
color
text-color
colour
text-colour
Which property is used to create space around an element's content inside its defined border?
padding
margin
Which property is used to create space around an element's content outside its defined border?
padding
margin
Which of these properties will let the div cover the entire width of its parent?
width:100px
width:100%
The two most common types of HTTP requests are
SET, POST
GET, POST
PUT, STOP
GET, STOP
Which attribute of the form determines the URL to which the data is sent?
action
method
encytype
target
Which property horizontally aligns the items in a flexible containers?
align-items
justify-content
justify-items
text-align
Which of the below is a CORRECT example of writing CSS properties?
font-size 20px color red
font-size: 20px; color: red;
font-size: 20px color: red
font-size 20px; color red
How is it possible to pass values from Python to HTML templates?
render_template("file.html", item=value)
rendertemplate(item=value, "file.html")
render_template("file.html", item:value)
render_template("file.html", item, value)
How is it possible to use a passed variable in an HTML template?
{ var_name }
{{ var_name }}
{[ var_name ]}
{% var_name %}
Template HTML files must be placed in which folder?
static
html
main
templates
CSS files must be placed in which file?
static
templates
main
style
Django is a web...
Language
Framework
Protocol
Algorithm
With Django, Python is used on the...
Front end
Back end
Could be either
To make your site available to anyone with access to the web, you need to copy the files to a web _______, which is a computer optimized to store and share the documents and that has an extremely high-speed Internet connection.
portal
server
publisher
client
Which heading HTML elements will create the smallest font size on a website?
<h1>name</h1>
<h3>name</h3>
<h6>name</h6>
<h2>name</h2>
<h5>name</h5>
Look at the list above and predict the HTML code you would use to display it correctly. Choose from the following answers.
Part of a CSS rule-set that defines which HTML elements the style should be applied to
CSS Selector
CSS
HTML
CSS Class
The web developer wants to make the "My Page" text larger. Which TWO of the following would work? (Click on image to make it larger)
Use <h6> instead of <h3>
Use <h1> instead of <h3>
Put the "My Page" text inside the tags.
Use CSS to set the font-size property of the h3 tag
Put the code `style="larger"` inside the h3 tag.
Which property would select to change the amount of space around an image on an html page?
float
margin
height
width
Which of the following statements is true?
A class is blueprint for the object.
You can only make a single object from the given class
Both statements are true.
Neither statement is true.
What does "SQL" stand for?
Structured Question Language
Structured Query Language
Simple Query Language
Simple Question Language
How would you define a relational database?
A database consisting of data relating to families
An online database
A database linked to another database
A database consisting of multiple tables, that are linked using keys
What is the definition of a Primary Key?
The first field in a database table
A field in a table that contains a unique identifier for each record in the table
A field in a database that can only contain two values
A field in the database that has the same value for each record
What is the definition of a Foreign Key?
A field in a table that is written in another language
A field in a table that links to the World Wide Web
A field in a table that cannot be edited or accessed by users
A field in a table that is used as a link to a field in another table
What is the primary purpose of using classes in Python?
To create reusable blocks of code that define a blueprint for objects.
To execute multiple functions simultaneously.
To handle exceptions during runtime.
To create complex mathematical models.
In the context of OOP, what is "inheritance" in Python?
The concept of encapsulating data within objects.
The method of defining private variables in a class.
The ability of a class to inherit methods and properties from another class.
The process of copying attributes from one object to another.
What is "polymorphism" in Python OOP?
The encapsulation of multiple data types in a single object.
The inheritance of methods from multiple parent classes.
The process of creating multiple objects from a single class.
The ability of different classes to define methods with the same name but different implementations.
In Python, what is the purpose of the super() function?
To initialize class-level variables.
To call a method from the superclass in a subclass.
To prevent a method from being overridden.
To access private variables from the superclass.
