Exam in
90 questions
Django is based on which framework?
For a model to be visible in the admin interface it has to be registered in which file?
Which of the following statement(s) is true about the JavaScript?
To perform programming logic in Django templates, you can use 'template tags', what is a correct syntax to start a 'for' loop?
What is a correct syntax for creating a Django project?
If you have a Django application named members, and a model named Member, what is a correct syntax to import the model?
Which is the correct syntax to call an external JavaScript file in the current HTML document?
Which JavaScript method is used to access an HTML element by id?
Which property is used to define the HTML content to an HTML element with a specific id?
When you have done changes in a model in Django, which command has to be executed in order to make the changes take effect in the database?
Which JavaScript method is used to write on browser's console?
Which JavaScript method is used to write into an alert box?
In HTML DOM, which of the following properties are read-only?
Which is the correct syntax to declare a constant in JavaScript?
What will be the output of this code?
const VALUE=10;
VALUE=20;
Can we use a function as a variable value?
What will be the value of X printed?
var X=10;
function myfunc() {
let x=20;
document.write(X);
}
What is the output of the following JavaScript code?
var a = 10 + 20 + "5";
document.getElementById("demo").innerHTML = a;
What will be the output of the following JavaScript code?
var x = 12.34;
document.getElementById("test").innerHTML = typeof(x);
Which is the correct syntax to access an object property in JavaScript?
var numbers = [1, 2, 3, 4];
function myfunc(total, value) {
return total + value;
var sum = numbers.reduce(myfunc, 2);
document.write(sum);
var numbers = [170, 50, 25];
return total - value;
var x = numbers.reduce(myfunc);
document.write(x);
"Expires: Tuesday, 17 Dec 2020 18:30 GMT" is a ______ header denoting ______.
const arr = [10, 20, 30];
let result = 0;
arr.forEach(myFunction);
document.write("Result: ", result);
function myFunction(value, index, array) {
result + value;
const values = [10, 20, 30];
const result = values.map(myFunction);
return value * value;
Which function is used to serialize an object into a JSON string in JavaScript?
In Python, ______ defines a block of statements.
What will be the output of this JavaScript code?
var x = [10, 20, 30];
return value > 10;
var y = x.find(myFunction);
document.write(y);
try {
const cars = {
company: "Honda",
color: "white"
};
var x = "color";
delete cars.company;
document.write(cars.company);
document.write(cars[x]);
} catch (err) {
document.write(err.message);
let x = 10;
let y = 20;
let text = "x * y";
let result = eval(text);
document.getElementById("demo").innerHTML = result;
var numbers = [10, 20, 30];
var y = numbers.filter(myFunction);
document.write(typeof(y));
var numbers = [10, 20, 10, 30];
var y = numbers.lastIndexOf(10);
var z = numbers.indexOf(30);
document.write(y + z);
What will be the output of the following JavaScript code snippet?
function test(...args) {
document.write(typeof(args));
test(12);
var quiz = [1, 2, 3];
var result = quiz.concat(6, 7, 8);
document.write(result);
var x;
for(x = 0; x < 5; x++) {
What will be the output of the following python code?
newtuple = (1, 2, 3, 4)
(*k,) = newtuple
print(k)
What will be the output of the following Python code?
(x, *k, y) = newtuple
Which is the correct HTML statement to define the red color of the paragraph text?
Which HTML tag is used to define highlighted text?
Which is the correct HTML statement to display H2O in a paragraph?
Which is the correct HTML statement to display Hello(strikethrough) Hi(underlined) in a paragraph?
Which attribute specifies the path to the image?
Can we use class name with multiple HTML elements?
The ______ property is used in the positioning of the background image.
Which of the following selectors selects the specified elements of type E with a particular class value?
Which of the following selectors selects all elements of E that have the attribute (attr) that ends with a given (value)?
Which of the following selectors selects an element that has no children?
b = "Hello, World!"
print(b[-5:-2])
thistuple = (1, 2, 3, 3, 4, 5)
x = thistuple.index(3)
print(x)
If an application is running on Asynchronous Server Gateway Interface (ASGI), then it will handle client requests in a sequential manner?
Can you play audios in HTML?
fruits = {"apple", "banana", "cherry"}
fruits.add("apple")
x = len(fruits)
car = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
y = car.keys()
car["color"] = "red"
print(len(y))
To add items from another set to the current set we use ______ method, while to append items from another list to the current list we use ______.
To make a copy of a dictionary, we can use
In CSS, "color:red" can be called as
External CSS style has the highest priority
The ______ HTTP request header specifies information about the software (browser) making the request.
What does {{ name }} this mean in Django Templates?
What is the output of the following JavaScript snippet?
x = "20";
Y = 10;
document.writeln(x + y, x - y);
Which of the following is the correct way of creating a hyperlink in HTML?
What is the purpose of using div tags in HTML?
Which of the following is the correct way to add background color in HTML?
If you have the following JavaScript statement: const f = (a, b) a + b + 5;
To multiply an array of numbers (named myNumbers) with 4, the following is a correct syntax to do it:
To select items that are less than 10 from an array of numbers (named myNumbers), the following is a correct syntax to do it:
var colors = (1:"red", 2:"green", 3:"blue") is one of the ways of defining an array in JavaScript?
In the following statement: myNumbers = [1, 2, 3]
x = myNumbers.pop()
The removed item will be 1
The removed item will be 3
In Python, the value of bool([]) is False?
In Python, it is possible to use the set() constructor to create a set?
In Python, A set is a collection which is both unordered and indexed?
def f(**person):
print("Person's name is " + person["name"])
f(name="Ahmed", age=10)
The above statement will return:
y = lambda x: x / 20
print(y(100))
In the following Python statements:
if 1>2:
print("One is less than Two!")
The output of the following statement in python is:
x = "My Lovely Bird!"
print(x[:7])
print(x[-7:])
const myArr = [1, 2, [3, [4, 5, 6], 7], 8];
const newArr = myArr.flat();
document.writeln(newArr);
To get the value of the text node of the h2 element node, you can use document.getElementById("id1").innerHTML which is equivalent to
Based on the above html page, the content of h2 element will be presented as
The number of objects in my variable is
By using this CSS selector div > p { color: red; }, how many p elements will be styled?
By using this CSS selector div ~ p { color: blue; }, the number of p elements that will be styled is
Using document.getElementById("id1").nodeType will return
In a[target=_blank], the [target=_blank] is called
By using p:first-child {color:red;}, the number of elements that will be styled
To change the background color of all <a> elements to be yellow, you can use
To change the color of <a> elements to yellow when the mouse moves over it, you can use
href is a/an ________ while "_blank" is a ________
The hyperlink <a href="https://w3schools.com"> is an example of a/an ________ URL, while <a href="Page2.html"> is an example of a/an ________ URL.