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

www.vustudents.ning.com

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

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

# CS101 Assignment No 03 Spring 2019 Solution & Discussion

CS101 Assignment No 03 Spring 2019 Solution & Discussion

Question No.1: You are required to create Currency Converter web page which can be used to convert input value (Pakistani Rupees) into Dollar, Yuan, Won, Riyal and Dinar.

Guidelines :

You are required to create a Currency Converter web page which takes value from the user in Pakistani Rupees and converts it into Dollar, Yuan, Won, Riyal and Dinar.
Create a button labeled as Convert. On Mouse Click event the function “Converter” should be called to convert Pakistan currency to other currencies.
“Welcome to the online Currency Converter” text should be moving from right to left.
You are required to enclose all the text boxes, labels and buttons in a border as shown in the sample output.
You are required to change the background color (other than white) of your web page.
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.
If the value is greater than 0 then your webpage will show converted values in Dollar, Yuan, Won, Riyal and Dirham in the given text boxes as shown in sample output.
If value less than 0 is entered in Pakistani Rupees text box and Covert button is clicked then alert should be shown through window.alert() as:

+ 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: 1753

.

+ 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?)

# CS101 Assignment Solution Part 2

SOLUTION Assignment No. 3 (CS101 – Introduction to Computing) Spring 2019

Full 100% Correct and full details and explanation.

CS101 3RD ASSIGNMENT SOLUTION
<html>
<title>Currency Converter</title>
<body>
<table Align="center" >
<tr><td style="background:Pink">
<h1>
Currency Converter </h1>
</td></tr>
<tr><td style="background:blueViolet">
Welcome to online Currency Converter
</td></tr>
</Table>
<form name="f">
<table Align="center">
<tr><td>
<br>
PAK Currency (Rupees) :
<input id="inputcurrency" type="number" name ="rupees">
<input type="button" name ="Convert" Value = "Convert" onclick="currencyConverter(f.rupees.value)"></td></tr>
</Table>
<br>
<table Align="center">
<tr><td> Dollar (American): </td><td><input id="dollar"> </td></tr>
<tr><td> Yuan (China):</td><td><input id="yuan"></td></tr>
<tr><td> Won (Korea): </td><td><input id="won"></td></tr>
<tr><td> Riyal (Saudia):</td><td> <input id="riyal"></td></tr>
<tr><td> Dinar (Kuwait): </td><td><input id="dinar"></td></tr>
<tr><td><input type="reset" name="reset" Value="Reset Form"></td></tr>
<tr><td colspan="2">You Can Press Reset Button for resetting the form</td></tr>
</Table>
</form>
<script>
function currencyConverter(valNum) {
if(f.rupees.value <= 0)
window.alert("Enter Value Greaterthan 0");
else
{
document.getElementById("dollar").value=(valNum/158.93).toFixed(2);
document.getElementById("yuan").value=(valNum/23.12).toFixed(2);
document.getElementById("won").value=(valNum/0.14).toFixed(2);
document.getElementById("riyal").value=(valNum/42.37).toFixed(2);
document.getElementById("dinar").value=(valNum/522.21).toFixed(2);
}
}
</script>

</body>
</html>

 Currency Converter
Currency Converter  Welcome to online Currency Converter

PAK Currency (Rupees) :

Dollar (American):
Yuan (China):
Won (Korea):
Riyal (Saudia):
Dinar (Kuwait):
You Can Press Reset Button for resetting the form

border ke formation ni is mai

or na ee welcome to online currency wali line right to left move kr ri

<html>
<title>Currency Converter</title>
<body style="background: #eee">

<center>
<div style="border :2px solid; width: 500px; text-align: center;">
<table Align="center" >
<tr><td style="background:Pink">
<h1>
Currency Converter </h1>
</td></tr>
<tr><td style="background:blueViolet">
Welcome to online Currency Converter
</td></tr>
</Table>
<form name="f">
<table Align="center">
<tr><td>
<br>
PAK Currency (Rupees) :
<input id="inputcurrency" type="number" name ="rupees">
<input type="button" name ="Convert" Value = "Convert" onclick="currencyConverter(f.rupees.value)"></td></tr>
</Table>
<br>
<table align="center" >
<tr><td> Dollar (American): </td><td><input id="dollar"> </td></tr>
<tr><td> Yuan (China):</td><td><input id="yuan"></td></tr>
<tr><td> Won (Korea): </td><td><input id="won"></td></tr>
<tr><td> Riyal (Saudia):</td><td> <input id="riyal"></td></tr>
<tr><td> Dinar (Kuwait): </td><td><input id="dinar"></td></tr>
<tr><td><input type="reset" name="reset" Value="Reset Form"></td></tr>
<tr><td colspan="2">You Can Press Reset Button for resetting the form</td></tr>
</Table>
</form>

</div>
</center>
<script>
function currencyConverter(valNum) {
if(f.rupees.value <= 0)
window.alert("Enter Value Greaterthan 0");
else
{
document.getElementById("dollar").value=(valNum/158.93).toFixed(2);
document.getElementById("yuan").value=(valNum/23.12).toFixed(2);
document.getElementById("won").value=(valNum/0.14).toFixed(2);
document.getElementById("riyal").value=(valNum/42.37).toFixed(2);
document.getElementById("dinar").value=(valNum/522.21).toFixed(2);
}
}
</script>

</body>
</html>

CS101 Assignment 3 Solution

CS101 Assignment 3 Solution

<html>

<title>Currency Converter</title>

<body>

<table Align="center" >

<tr><td style="background:yellow">

<h1>

Currency Converter </h1>

</td></tr>

<tr><td style="background:blueViolet">

Welcome to online Currency Converter

</td></tr>

</Table>

<form name="f">

<table Align="center">

<tr><td>

<br>

PAK Currency (Rupees) :

<input id="inputcurrency" type="number" name ="rupees">

<input type="button" name ="Convert" Value = "Convert" onclick="currencyConverter(f.rupees.value)"></td></tr>

</Table>

<br>

<table Align="center">

<tr><td> Dollar (American): </td><td><input id="dollar"> </td></tr>

<tr><td> Yuan (China):</td><td><input id="yuan"></td></tr>

<tr><td> Won (Korea): </td><td><input id="won"></td></tr>

<tr><td> Riyal (Saudia):</td><td> <input id="riyal"></td></tr>

<tr><td> Dinar (Kuwait): </td><td><input id="dinar"></td></tr>

<tr><td><input type="reset" name="reset" Value="Reset Form"></td></tr>

<tr><td colspan="2">You Can Press Reset Button for resetting the form</td></tr>

</Table>

</form>

<script>

function currencyConverter(valNum) {

if(f.rupees.value <= 0)

window.alert("Enter Value Greaterthan 0");

else

{

document.getElementById("dollar").value=(valNum/158.93).toFixed(2);

document.getElementById("yuan").value=(valNum/23.12).toFixed(2);

document.getElementById("won").value=(valNum/0.14).toFixed(2);

document.getElementById("riyal").value=(valNum/42.37).toFixed(2);

document.getElementById("dinar").value=(valNum/522.21).toFixed(2);

}

}

</script>

</body>

</html>

iss mn kiya mistake ha?

## Latest Activity

14 minutes ago
27 minutes ago
29 minutes ago
34 minutes ago
35 minutes ago
36 minutes ago
36 minutes ago
Saahil Khan is now a member of Virtual University of Pakistan
58 minutes ago
Tayyaba Malik joined + M.Tariq Malik's group

2 hours ago
4 hours ago
4 hours ago
5 hours ago

1

2

3