0% found this document useful (0 votes)
13 views4 pages

Practical 1 - SL

Uploaded by

vidhikoypare28
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

Practical 1 - SL

Uploaded by

vidhikoypare28
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Software Lab (N-PCCCS304P)

Practical No. 01

Aim: Understand the concepts of Front-End Programming and create an HTML


Web Page that will accept two numbers and perform arithmetic operations using
JavaScript.

Name of Student: VIDHI KOYPARE

Roll No.: CS23053

Semester/Year: III/II

Academic Session: 2024-2025

Date of Performance: __________

Date of Submission: __________

Department of Computer Science & Engineering, S.B.J.I.T.M.R, Nagpur.


Software Lab (N-PCCCS304P)

AIM: Understand the concepts of Front-End Programming and create an HTML Web Page that
will accept two numbers and perform arithmetic operations using JavaScript.

OBJECTIVE/EXPECTED LEARNING OUTCOME:


The objectives and expected learning outcome of this practical are:

● To understand the concept of Front-End Programming language.

● Able to do arithmetic operation using JavaScript.

Hardware Requirement: Processor,memory,secondary,storage,etc


Software Requirement: create a html coding for a page,save the documrnt as a web file,and
open it in browser,VS code and Notepad .
THEORY:

JavaScript Arithmetic Operators

Arithmetic operators perform arithmetic on numbers (literals or variables).

Operator Description

+ Addition

- Subtraction

* Multiplication

** Exponentiation (ES2016)

/ Division

% Modulus (Remainder)

++ Increment

-- Decrement

Department of Computer Science & Engineering, S.B.J.I.T.M.R, Nagpur.


Software Lab (N-PCCCS304P)

Operators and Operands

The numbers (in an arithmetic operation) are called operands.

The operation (to be performed between the two operands) is defined by an operator.

CODE:
<html>

<head>
<title>Arithmetic Operations</title>
</head>
<body>
<script type="text/javascript">
var a = 12;
var b = 34;
var result;
document.write("Value of a = " + a + " and b = "+ b);
result = a + b;
document.write("<br>Addition of a & b = " + result );
result = a - b;
document.write("<br>Subtraction of a & b = " + result );
result = a * b;
document.write("<br>Multiplication of a & b = " + result );
result = a / b;
document.write("<br>Division of a & b = " + result );
</script>
</body>
</html>

OUTPUT:

Department of Computer Science & Engineering, S.B.J.I.T.M.R, Nagpur.


Software Lab (N-PCCCS304P)

CONCLUSION: We successfully understand the concepts of Front-End Programming and


created an HTML Web Page that will accept two numbers and perform arithmetic operations
using JavaScript.

DISCUSSION AND VIVA VOCE:

• Differentiate Frontend and Backend?

• Enumerate the differences between Java and JavaScript?

• Which keyword is supported by JavaScript?

• Is JavaScript a case-sensitive language?

• What is operand?

REFERENCE:
• www.w3schools.com
• www.tutorialsmade.com
• https://www.edureka.co/blog/interview-questions/javascript-interview-questions/

Department of Computer Science & Engineering, S.B.J.I.T.M.R, Nagpur.

You might also like