This question paper contains 5 printed pages]
RoU No.
S. No. of Question Paper
'Unique Paper Code
- Name of the Paper
Name of .the Course
: B.A. (Prog.)IB.Sc.(P)/B.Sc. Maths. Sc.
Sem-2ster
:V
Duration : 3 Hours
Maximum Marks : 90
(Write your Roll No. on the top immediately on receipt of this question paper)
This paper contains two sections-Section A and Section B.
Section A is compulsory. It carries 30 marks.
Attempt any four ·questions out of six from Section B. Each question in Section B carries
15 marks.
Parts of a question must be answered together.
Section-A
(Compulsory)
I. (a)
How to insert an image in an HTML webpage.? Specify any two attributes.
(b) 2
Write an HTML code to create a definition list.
(c) 2
List any two differences between the GET and POST methods.
(cl) 2
Write the HTML statement to change the background color of a• webpage.
(e) 2
How client-side language is different from a server-sidi·Janguage ? Explain.
3
P.T,O.
2426
( 2.)
4
(j) Give the output of the following code with an explanation :
letstr = "10";·
let num = 10;
console. log ( str = = num) ;
. console. log ( str = = = -num) ;
(g) Write a JavaScript program using arrays to generate arid display the current date on
4
a webpage. 5
(h) Answer the following questions :
(i) Which HTML tag is used to create a drop-down list box ?
(ii) What does the 'action' attribute signify in an HTML form ?
(ii~ Which !ITML attribute specifies an alternate text for an image if the image cannot
be displayed. ?
(iv) How many sizes of headers are available in HTML by default?
(v) How to insert comments in HTML ?
m Write a PHP program to find the prime factors of a number. Take the input from the
6
user through an HTML form.
Section-B .
2. (a) Write a PHP program to print the sum of digits of a four-digit·number. 4
(b) Differentiate \,elweeil 'break' and 'continUe' statements. Give a suitable example of each,
5
(c) · What is the Document Object Model in JavaScript? Create an object in JavaScript
that stores infonnation about a pet 'Dog' with properties 'name', 'age' and 'eye_color'.
Delete the 'eye_co/Or' property and display the remainhlg properties of 'Dog' object. 6
( 3 )
2426
3. (a) Write an HTML code to create the following list :·
5
(1) Mathematics
.
• Linear Algebra
• · Quadratic Equations
• Probability
(2) Computer Science
(i) Algorithms
(iz) Python
(iii) Java.
(b) Write PHP code to perform the following operations :
IO.
(1) Connect and create a 'School' database in MySQL.
(ii) Create a 'Student' table in the 'School' database
(iii) Insert the record for three students with (Name, Roll_No, Course) into the
'Student' table.
(iv) Display the details of all the students on a webpage.
4. (a) Describe the functions performed by the following HTML terms :
4
(1) <hr>
(ii) <div>
(iiz) <a>
. (iv) <br>
P.T.O.
2426
( 4 )
5
(b) Write a PHP program to print the following pattern :
1 2
1 2 3
1 2 3 4
(c) Create a student registration form with three fields ('Name', 'Age' and 'Password').
6
Validate this form in Java'Script using the following checks :
(i) 'Name' field should be non-empty.
(ii) 'Age' must be greater than 17
(iiz) 'Password' must be a 10-digit alphanumeric value.
5.. (a) Explain the method 'getElementByldO' in JavaScript with the help of an example. List
any two differences between 'let' and 'var' in JavaScript with suitable examples. 5 .
(b) Write an HTML code to create the given table (Players' Data) fulfilling the following
10
conditions :
. (z) Caption to the table.
(ii) Space of 1 0px between the cells of the table.
(iiz) Space of 20px between the content and the boundaries of the cell of the table.
Players' Data
Average Red eyes
Height . Weight
0.003 40%
Male ·1.9
0.002 43%
Female . 1.7
( 5 -)
2426
6. (a) What is the difference between pass-by-value and pass-by-reference ? Explain with the
help of an example. 4
(b) What is the purpose of <select> tag in HTML ? Write an HTML code that displays
a paragraph "Welcome to Web Programmin g" in green color with font style 'Times
' New Roman' and font size '14'.
5
(c) Explain prompu); confirm O and alert O functions in JavaScript.
6
7. (a) Give any two values for the 'target' attribute defined under the anchor tag in HTML·
and define its purpose. 4
(b) What is the difference between the 'echo' and 'print' commands in PHP ? Write a
PHP program to print the largest of three numbers.
5
(c) Answer the following questions with respect to JavaScript :
6
(1) List any four data types.
(h) Explain the use of 'evalt)' and 'parselnuy functions with the help of an example.
(iii) Explain the difference between 'onLoad' and 'onError' events.
2426
5