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

Lab Exam 16 10 2020

The document outlines a web security lab assessment with 9 questions. The questions involve writing JavaScript programs to calculate monthly car payments and loan amounts, determine student averages from test scores, validate registration numbers, and calculate simple interest. The programs are to include input fields and buttons to accept user input and display output.

Uploaded by

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

Lab Exam 16 10 2020

The document outlines a web security lab assessment with 9 questions. The questions involve writing JavaScript programs to calculate monthly car payments and loan amounts, determine student averages from test scores, validate registration numbers, and calculate simple interest. The programs are to include input fields and buttons to accept user input and display output.

Uploaded by

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

Web Security :LAB ASSESMENT(15 Marks).

1.You have saved some amount to use as a down payment on a car. Before beginning your car
shopping, you decide to write a program to help you figure out what your monthly payment will be,
given the car’s purchase price, the monthly interest rate, and the time period over which you will
pay back the loan. The formula for calculating your payment is

payment = iP / (1 - (1 + i)-n )

where P = principal (the amount you borrow)

i = monthly interest rate (1/12 of the annual rate)

n = total number of payments

Total number of payments is usually 36, 48, or 60 (months). Program should then display the
amount borrowed and the monthly payment rounded to two decimal places.

Input Format: Purchase price, down payment, annual interest rate and total number of payments

Output: Amount borrowed and EMI

 a text field that requires a number and a button, which gives us the amount borrowed and
EMI . We have to enter a number in the given textfield to find the EMI . Then we need to
click the given button named EMI to get the result.
 click the given button named Amount borrowed to get the result.

2. HTML+Java script to determine the average marks scored by each student. The details of the
student include name, register number, and five marks. Write a Script to determine the total
marks scored by the student .

Input Format-Use text field to accept input.


Number of students
Register number of student1
Five marks of student1

Output Format
Details of student as a list with name, register number, marks and total
 Display click the given button named Details of the student to get the result.

3. Register number –year

Check the entered reg number is valid or not.

 Ex:19BCE0256
 First two letters must be of type digits.
 Next 3 letters must be characters.
 Next four letters must be of type digits.

Input Format-Use text field to accept input.


Use text field to accept the input reg.no

Output Format

 click the given button named Register Number to get the result whether valid or invalid.

4. Write a Java Script to compute the Simple interest (SI) input principle, time and rate (P, T, R) from
user and find Simple Interest. Logic to find simple interest in Java script.

SI=PTR/100;

Input Format-Use text field to accept input.

Use text field to accept the input. P,T,R.

Output Format:

• click the given button named Simple Interest to display the result.

Input Format-Use text field to accept input.


Use text field to accept the input reg.no

Output Format

 click the given button named Register Number to get the result whether valid or invalid.

5.You have saved some amount to use as a down payment on a car. Before beginning your car
shopping, you decide to write a program to help you figure out what your monthly payment will be,
given the car’s purchase price, the monthly interest rate, and the time period over which you will
pay back the loan. The formula for calculating your payment is

payment = iP / (1 - (1 + i)-n )

where P = principal (the amount you borrow)

i = monthly interest rate (1/12 of the annual rate)

n = total number of payments

Total number of payments is usually 36, 48, or 60 (months). Program should then display the
amount borrowed and the monthly payment rounded to two decimal places.

Input Format: Purchase price, down payment, annual interest rate and total number of payments
Output: Amount borrowed and EMI

 a text field that requires a number and a button, which gives us the amount borrowed and
EMI . We have to enter a number in the given textfield to find the EMI . Then we need to
click the given button named EMI to get the result.
 click the given button named Amount borrowed to get the result.

6. HTML+Java script to determine the average marks scored by each student. The details of the
student include name, register number, and five marks. Write a Script to determine the total
marks scored by the student .

Input Format-Use text field to accept input.


Number of students
Register number of student1
Five marks of student1

Output Format
Details of student as a list with name, register number, marks and total
 Display click the given button named Details of the student to get the result.

7. Register number –year

Check the entered reg number is valid or not.

 Ex:19BCE0256
 First two letters must be of type digits.
 Next 3 letters must be characters.
 Next four letters must be of type digits.

Input Format-Use text field to accept input.


Use text field to accept the input reg.no

Output Format

 click the given button named Register Number to get the result whether valid or invalid.

8. Write a Java Script to compute the Simple interest (SI) input principle, time and rate (P, T, R) from
user and find Simple Interest. Logic to find simple interest in Java script.

SI=PTR/100;

Input Format-Use text field to accept input.

Use text field to accept the input. P,T,R.

Output Format:
• click the given button named Simple Interest to display the result.

Input Format-Use text field to accept input.


Use text field to accept the input reg.no

Output Format

 click the given button named Register Number to get the result whether valid or invalid.

9.You have saved some amount to use as a down payment on a car. Before beginning your car
shopping, you decide to write a program to help you figure out what your monthly payment will be,
given the car’s purchase price, the monthly interest rate, and the time period over which you will
pay back the loan. The formula for calculating your payment is

payment = iP / (1 - (1 + i)-n )

where P = principal (the amount you borrow)

i = monthly interest rate (1/12 of the annual rate)

n = total number of payments

Total number of payments is usually 36, 48, or 60 (months). Program should then display the
amount borrowed and the monthly payment rounded to two decimal places.

Input Format: Purchase price, down payment, annual interest rate and total number of payments

Output: Amount borrowed and EMI

 a text field that requires a number and a button, which gives us the amount borrowed and
EMI . We have to enter a number in the given textfield to find the EMI . Then we need to
click the given button named EMI to get the result.
 click the given button named Amount borrowed to get the result.

You might also like