0% found this document useful (0 votes)
13 views

Spring 2024_CS202_2

Uploaded by

Kuku Raja
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Spring 2024_CS202_2

Uploaded by

Kuku Raja
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment No.

02 Total Marks: 20
Semester: Spring 2024 Week (6-11)
CS202: Fundamentals of Front-End Topics: (61 to 138)
Development Due Date: June-24-2024

Instructions:

Please read the following instructions carefully before submitting an assignment. It should be clear that your
assignment will not get any credit if:

▪ The assignment is submitted after the due date.


▪ The submitted assignment does not open or the file is corrupt.
▪ Assignment is copied (partial or full) from any source (websites, forums, students, etc.)

Note:
1) You have to just upload a .doc and .docx file which will have the code of HTML and JavaScript and
Screenshot of the Output. Assignment in any other format (extension) will not be accepted and will be
awarded with zero marks.

Objectives:
The objectives of this assignment are:
● To learn and practice the basic JavaScript.
● Use of JavaScript functions, events, loops, and conditional statement.

Note:

● This assignment is a Graded Assignment.


● The assignment submitted through email will not be accepted.
● This assignment is covering Week (6-11) Topics: (61 to 138).
● For details of topics in each lecture, see syllabus file given in download section of this course. The
link of file is: https://vulms.vu.edu.pk/Courses/CS202/Downloads/CS202%20Mid%20Term
%20Syllabus.pdf

Guidelines:
▪ Code should be properly indented.
▪ You can use the following tools/software:
o Notepad or Adobe Dreamweaver
For any query about the assignment, contact at [email protected].
Assignment Statement:

You are required to build a simple web application that allows users to enter their grades for multiple subjects.
The application will calculate the average grade and determine if the user passed or failed based on the average
grade.
To build this application you are required to use concepts of JavaScript along with HTML.
You are required to perform following steps.
1. Create an HTML form to get grades from the user for 4 subjects.
2. Add a "Calculate Average" button in the HTML form that triggers a JavaScript function.
3. Write a JavaScript function that uses loops and if-else statements to calculate the average grade and
determine if the user passed or failed. The passing criteria is 50 percent marks in average.
4. Use your own name and VUID to print the result in both cases (pass or fail).
5. Copy your HTML and JavaScript code from the editor and paste it into a Word document. Also, attach a
screenshot of the output in the Word document.

Note: You may use either internal or external JavaScript.

Solution Output:

Figure 1: HTML form to get user input


Figure 2: JavaScript Applied to get output (Pass)

BEST OF LUCK! 😊

You might also like