Mid Exam

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

Lahore Leads University-NAVTTC

PMYSDP "Skills for All" Program (Batch-IV)

Mid-Term Exam

Paper: Mid Term Exams


Name: _________________________
TRADE: (CIT) (Web Software & Mobile Web Development) Date: _________________________
Total Time: 4Hrs Roll No: ________________________
Total Marks: 100

Question:1 Choose the correct option Mark(1x15)

1. Which attribute is used to provide additional information about an element in HTML5?


A) `class`
B) `id`
C) `role`
D) `data-*`

2. What is the purpose of the `<canvas>` element in HTML5?


A) It is used to draw graphics using JavaScript.
B) It provides a container for audio and video content.
C) It defines a section of a document that contains related content.
D) It represents a self-contained composition in a document.

3. Which HTML element is used to define a dropdown list?


A) `<select>`
B) `<option>`
C) `<input>`
D) `<datalist>`

4. What is the purpose of the `autocomplete` attribute in an HTML form input element?
A) It specifies whether the input field should be auto-completed by the browser.
B) It sets the default value of the input field.
C) It defines the maximum number of characters allowed in the input field.
D) It indicates whether the input field is required to be filled.

5. What is the purpose of the CSS `float` property?


A) It specifies the position of an element relative to its normal position.
B) It determines how text should wrap around an element.
C) It sets the size of an element relative to its parent container.
D) It controls the spacing between lines of text within an element.
6. What does the CSS `z-index` property control?
A) The order of stacking elements in a document
B) The width of an element's border
C) The opacity of an element
D) The alignment of text within an element

7. Which CSS selector targets the direct child elements of a parent element?
A) `>`
B) `+`
C) `~`
D) `:first-child`

8. What is the purpose of the CSS `box-sizing` property?


A) It adjusts the size of an element's border box to include padding and border.
B) It sets the spacing between lines of text within an element.
C) It specifies the font style to be used within an element.
D) It controls the position of an element relative to its normal position.

9. What does the JavaScript `NaN` value represent?


A) "Not a Number"
B) "Null and None"
C) "No Available Number"
D) "Non-Accessible Name"

10. What is the purpose of the JavaScript `map()` function?


A) It creates a new array with the results of calling a provided function on every element in the array.
B) It filters an array based on a given condition and returns a new array.
C) It checks if at least one element in an array satisfies a given condition and returns a boolean value.
D) It reduces an array to a single value by performing a specified operation on each element.

11. How do you convert a string to an integer in JavaScript?


A) `parseInt()`
B) `parseFloat()`
C) `String()`
D) `Number()`

12. What does the JavaScript `push()` method do?


A) It adds one or more elements to the beginning of an array and returns the new length.
B) It removes the last element from an array and returns that element.
C) It adds one or more elements to the end of an array and returns the new length.
D) It reverses the order of the elements in an array.

13. What is the purpose of the JavaScript `querySelectorAll()` method?


A) It retrieves the first element that matches a specified CSS selector.
B) It retrieves all elements that match a specified CSS selector as a static NodeList.
C) It converts a NodeList to an array.
D) It checks if a specific element exists within a given array.
14. What is the output of the following code snippet?
console.log(2 + 2 + "2");
A) `42`
B) `22`
C) `4`
D) `TypeError`

15. Which keyword is used to exit a loop in JavaScript?


A) `exit`
B) `stop`
C) `break`
D) `quit`

Question:2 Attempt all Question Marks: (25)


i. Explain the difference between == and === operators in JavaScript? (5)
Ans.__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
ii. Explain the CSS box model and its different components. (5)
Ans.__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________

iii. Write pseudo code for Palindrome Word Checker?


(5)
Ans.__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________

iv. Write complete code just in HTML for following output? (10)

Question:3 Mark(60)
After completing the written portion of the exam, please proceed to the practical task which has been
uploaded separately on your Google classroom.

Dear students,

It is notifying that Midterm Exams of PMYSDP "Skills for All" Program (Batch-
IV) has been scheduled on Monday, 17-07-2023 at 1 pm in Computer Lab 1.
Make sure to prepare 50% of course syllabus thoroughly. Good luck with your
preparations!
Instructions:
 Every student must bring their Identification Document such as Original
CNIC/B-Form
 Report at the Exam Center 30 Minutes before the starting time of paper
Student who came 15 minutes after the start of paper we be treated as
Absent.
 Clearly stated that whether electronic devices like mobile phones,
smartwatches or laptops or other cheating material like cheatsheet are
prohibited during exams.

Best regards,

CIT Incharge: Sir Ahmad


Take two images of any sports and implement hover effect on first image using
hover property and second image with JavaScript
Like given example of nature

Create Calculator with HTML CSS and JavaScript use maximum styling property
to make output as given below:

You might also like