PAT1-CSS (22519) 2023-24 With Model Ans
PAT1-CSS (22519) 2023-24 With Model Ans
As per MSBTE guidelines, PAT 1 is to be conducted in offline mode during 04 to 06 Sept. 2023
Refer MSBTE curriculum for Specification table for Question paper design
Refer MSBTE sample paper available online on MSBTE website.
Remember level- 30% ,Understand level: 35-40% , Application level- 30 to 40 %
Maximum Marks: 20 with option 26 or 28 marks
Write list of course outcomes to be considered for designing Question paper
Prepare Question paper specification table as per given format
List of Course Outcomes for PAT 1
Marks out of
CO No. CO Statement
26 for PAT 1
CO1 Create interactive web pages using program flow control structure. 08
CO2 Implement arrays and functions in Java script. 10
CO3 Create event based web forms using Java script. 08
CO1(A) a) Develop a program to create person object with properties firstname, lastname, age,
eye color, delete eye color property and display remaining properties of person
object.
CO2(U) b) Explain join( ) method with example.
CO2(A) c) Develop a code to call function from HTML.
CO3(U) d) Explain how to change Label dynamically with the help of example.
CO1(A) a) Develop a program to create person object with properties firstname, lastname, age,
eye color, delete eye color property and display remaining properties of person
object.
CO2(U) b) Explain join( ) method with example.
CO2(A) c) Develop a code to call function from HTML.
CO3(U) d) Explain how to change Label dynamically with the help of example.
Model Answer of CSS (22519) PAT 1
Que. Marking
Question & Answer
No. Scheme
a List any four:
i) Arithmetic operators
ii) Relational operators
Answer:
i) Arithmetic operators:
a) + (Addition)
b) – (Subtraction)
c) * (Multiplication) 1 Mark for
d) / (Division) each
e) % (Mod) operators list
ii) Relational operators:
a) < (Less than)
b) > (Greater than)
c) <= (Less than or equal to)
d) >= (Greater than or equal to)
e) = = (Equal to)
f) != (Not equal to)
b Explain if…else with example.
Answer:
Explanation:
The if…else statement executes a block of code if a specified condition is true. If
the condition is false, another block of code can be executed.
Syntax:
if (condition) {
// block of code to be executed if the condition is true
}
else { 01 Mark for
// block of code to be executed if the condition is false Explanation
and 01 Mark
}
for Example
Example:
<html>
<head>
<title> Greater from Two numbers </title>
</head>
<body>
<script type="text/javascript">
var a=4, b=7;
if(a>b)
{
alert("a is greater");
}
else
alert("b is greater");
</script>
</body>
</html>
c How to define function.
Answer:
i) A JavaScript function is defined with the function keyword, followed by a
name, followed by parentheses ().
ii) The parentheses may include parameter names separated by commas. 2 Marks for
iii) The code to be executed, by the function, is placed inside curly brackets: { } function
Function define using: definition
function name(parameter1, parameter2, parameter3)
{
// code to be executed
}
d List any four form elements.
Answer:
i) Button
ii) Checkbox
1/2 Mark for
iii) Option
each element
iv) Radio Button
v) Select
vi) Text
vii) Textarea
e Develop a code for onclick event in JavaScript.
Answer:
<html>
<body>
<h2>The onclick Event</h2>
<p id="demo" onclick="myFunction()">Click me.</p>
<script> 2 Marks for
function myFunction() { correct logic
document.getElementById("demo").innerHTML = "YOU CLICKED ME!";
}
</script>
</body>
</html>
delete person.eyeColor
//After delete eyeColor property
// Display full name
document.getElementById("demo1").innerHTML="First
name:"+person.firstname+"<br>Last
name:"+person.lastName+"<br>Age:"+person.age+"<br>Eye
color:"+person.eyeColor;
</script>
</body>
</html>
b Explain join( ) method with example.
Answer:
i) The join() method returns an array as a string.
ii) The join() method does not change the original array.
iii) Any separator can be specified. The default is comma (,).
Syntax:
array.join(separator)
Example:
<html> 2 Marks for
<body> explanation
<h1>JavaScript Arrays</h1> and
<h2>The join() Method</h2> 2 Marks for
<p>join() returns an array as a string:</p> correct
<p id="demo"></p> example
<script>
const fruits = ["Banana", "Orange", "Apple", "Mango"];
let text = fruits.join();
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>
c Develop a code to call function from HTML.
Answer:
<html>
<head>
<title> Demo of Calling a Function From HTML </title>
<script type="text/javascript"> 4 Marks for
function fun() correct logic
{ (Any other
document.write("This is A sample statement in Fun()."); logic may
} consider)
</script>
</head>
<body onload="fun()">
</body>
</html>