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

# 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?..

Views: 1433

.

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

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

# 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)
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 100% Correct and Different Solution from Others. Solution According to Assignment File

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

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

boy updated their profile
55 minutes ago
boy, bunny, ALAMU John and 7 more joined Virtual University of Pakistan
1 hour ago

1 hour ago
+ ! ! ! ! ! ! ! ! ! AG liked Student's discussion cs403 Current paper
1 hour ago
2 hours ago
2 hours ago
+ ! ! ! ! ! ! ! ! ! AG liked + "αяsαℓ " Ќąƶµяɨ •"'s discussion Dove vs goldleaf
2 hours ago

1

2

3