Skip to content

Vu Cs101 Assignment 5% Solution Calculation

ASSIGNMENT objectives

After solving this assignment, students will learn about,

  • HTML tags and handling of HTML tags.
  • Table creation and handling in HTML.
  • Knowledge about JAVASCRIPT functions and JAVASCRIPTS events.

ASSIGNMENT important instructions

Please read the following instructions carefully before submitting assignment:

  • It should be clear that your assignment will not get any credit if:
  • The assignment is submitted after due date.
  • The assignment is submitted via email.
  • The assignment is copied from Internet or from any other student.
  • The submitted assignment does not open or file is corrupt.
  • It is in some format other than .html.

Note: All types of plagiarism are strictly prohibited.

For any query about the assignment, contact at cs101@vu.edu.pk

question statement

Note: Students are required to submit HTML code file only with .html extension. Don’t upload word format file(.doc) etc.

You are required to write HTML with Java Script code to create Weight Converter Calculator web page which can be used to convert values entered in Kilo Gram to Gram, Pounds, Milligrams, US tons and Ounces respectively.

Solution guidelines of this web page are given as follow,

  • You are required to create a text for taking input from the users in Kilo Grams. This text box can be labelled as Weight in KG.
  • The users will be required to enter their input in Weight in Kg.
  • Create one button labeled as Convert. On Mouse Click event the function “Converter” should be called to covert KG value to other units.
  • If no value or less than 0 is entered in KG text box and Covert button is clicked then alert should be shown through window. Alert () as:
  • If the values are greater than 0 then your webpage will show converted values in Grams, Pounds, Milligrams, US tons and Ounces in the given text boxes as shown in sample output.
  • Create another button labeled as Reset Form to clear text box values.
  • You are required to use table so that items of the webpage will be shown in the arranged form.

Formula for KG to Grams conversion is:

Formula for KG to Pounds conversion is:

Formula for KG to Milligrams conversion is:

Formula for KG to Pounds conversion is:

Formula for KG to Pounds conversion is:

Sample Output (Snapshot): Color Scheme may be of your choice.

CS101 Assignment No 01 Solution & Discussion Due Date: 06-11-2017

Question No. 1                                                                                                                           [Marks 6]

Convert (10101000)2 into decimal equivalent. You have to show all conversion steps.

Question No. 2                                                                                                                           [Marks 14]

You are required to solve the given Boolean Expression by filling the following truth table.

((AB) / + A/ +(BÅ C/))

A

B

C

AB

(AB)/

A/

C/

(BÅ C/)

A/ +(BÅ C/)

((AB) / + A/ +(BÅ C/))

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1