We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Assignment No. 02 Semester: Fall 2017 Introduction to Computing - CS101 Total Marks: 20 Due Date: 12-01-2018

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 is 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:

 

Kilo Grams= KG*1000

 

Formula for KG to Pounds conversion is:

 

Pounds = KG* 2.2046

 

Formula for KG to Milligrams conversion is:

 

Milligrams = KG* 1000000

 

Formula for KG to Pounds conversion is:

 

US Ton = KG* 0.0011023

 

Formula for KG to Pounds conversion is:

 

Ounce = KG* 35.274

 

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

 

 

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 8155

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

Cs101 assignment solution

<html>

 <head>

  <title>Weight Calculator</title>

  <script>

   function check(){

    var x;

     x = document.getElementById('in_kg').value;

     if (isNaN(x) || x <= 0) {

      window.alert("Enter value grater than 0");

     }else{

      var num;

      num = x * 2.2046 ;

      document.getElementById('pounds').value = num;

            num = x * 1000 ;

      document.getElementById('grams').value = num;

                        num = x * 1000000 ;

      document.getElementById('mg').value = num;

      num = x * 0.0011023 ;

      document.getElementById('Us_ton').value = num;

      num = x * 35.274 ;

      document.getElementById('ounce').value = num;

     }

   }

  </script>

 </head>

 

 <body>

 <div align="center" style="margin-left: 35%; margin-right: 35%;">

  <div style="font-size: 36px; background-color:; color: deepskyblue;">Weight Converter</div>

  <p style="font-size: 20px; background-color blueviolet; margin: 5px;">Welcome to the online converter</p>

 </div>

 <form align="center">

  <table align="center">

   <tr>

    <td>

     <label>Weight in KG:</label>

    </td>

    <td>

     span id="IL_AD7" class="IL_AD">input type="number" name="kg" id="in_kg">

     <input type="button" name="submit" value="Convert" onclick="check()">

    </td>

   </tr>

   <tr>

    <td>

     <label>Weight In Poundss:</label>

    </td>

    <td>

     <input type="number" name="in_g" id="pounds">

    </td>

   </tr>

   <tr>

    <td>

     <label>Grams:</label>

    </td>

    <td>

     <input type="number" name="in_p" id="grams">

    </td>

   </tr>

   <tr>

    <td>

     <label>MilliGram:</label>

    </td>

    <td>

     <input type="number" name="in_m" id="mg">

    </td>

   </tr>

   <tr>

    <td>

     <label>US Ton:</label>

    </td>

    <td>

     <input type="number" name="in_t" id="Us_ton">

    </td>

   </tr>

   <tr>

    <td>

     <label>Ounces:</label>

    </td>

    <td>

     <input type="number" name="in_o" id="ounce">

    </td>

   </tr>

  </table>

  <div id="grams"></div>

  <input type="reset" name="reset" value="Reset Form">

 

 <p>You can press Reset Button for another conversion</p>

 </form>

 </body>

</html>

thank u ab ak km or kr dy MGT301 ki quiz ha ans bta dy agr ksi or ki ho gi ha to 

RSS

Latest Activity

DEE EX liked + M.Tariq Malik's group PAK301 Pakistan Studies
24 minutes ago
DEE EX liked + M.Tariq Malik's group ENG502 Introduction to Linguistics
25 minutes ago
Zainab Mughal joined + M.Tariq Malik's group
26 minutes ago
Zainab Mughal joined + M.Tariq Malik's group
28 minutes ago
Zainab Mughal joined + M.Tariq Malik's group
32 minutes ago
Zainab Mughal commented on + M.Tariq Malik's group MCD401 Camera basics, principles and practices
40 minutes ago
Zainab Mughal commented on + M.Tariq Malik's group MCD401 Camera basics, principles and practices
42 minutes ago
Zainab Mughal and + Iuuoɔǝut+ are now friends
1 hour ago
+ Iuuoɔǝut+ replied to + Iuuoɔǝut+'s discussion Mind blowing mehndi design ...
1 hour ago
+ Iuuoɔǝut+ replied to + Iuuoɔǝut+'s discussion آپ کی آنکھیں وہی کھولتے ہیں۔۔۔۔۔۔۔۔
1 hour ago
+ Iuuoɔǝut+ replied to + Iuuoɔǝut+'s discussion دولت کی اہمیت۔۔۔۔۔۔
1 hour ago
+ Iuuoɔǝut+ replied to + Iuuoɔǝut+'s discussion Aulaad ki ahmiyat ...
1 hour ago
+ Iuuoɔǝut+ replied to + Iuuoɔǝut+'s discussion hijar ka tara doob chala hy ......wasi shah
1 hour ago
+!!!شب تنہائی!!! + posted discussions
1 hour ago
+ Iuuoɔǝut+ replied to + Iuuoɔǝut+'s discussion Share your opinion on boys and girls on ning...
1 hour ago
+ M.Tariq Malik left a comment for Zainab Mughal
1 hour ago
+ M.Tariq Malik liked 彡JK彡 ❤️'s discussion Dear Daughters...... ^_^
2 hours ago
彡JK彡 ❤️ posted a discussion
2 hours ago
DEE EX updated their profile
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Muhabato me li gaye kasmain
5 hours ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service