From 1ebe65a73af89fd9cac5a82badf0b7a099701e7f Mon Sep 17 00:00:00 2001 From: Dilip Kumar Reddy Kotte <70163818+dilipreddy003@users.noreply.github.com> Date: Thu, 3 Sep 2020 17:26:03 +0530 Subject: [PATCH 01/14] changed the coordinates for if else dropdown changes coordinates,link 1,day2,CSE6_1 --- src/lab/exp6/simulation/IfElse/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lab/exp6/simulation/IfElse/index.html b/src/lab/exp6/simulation/IfElse/index.html index 46080f90..52b734e2 100644 --- a/src/lab/exp6/simulation/IfElse/index.html +++ b/src/lab/exp6/simulation/IfElse/index.html @@ -14,12 +14,12 @@
Initialize
-
x1 = 075;   y1 = 075;
-
x2 = 275;   y2 = 075;
-
x3 = 275;   y3 = 325;
-
x4 = 075;   y4 = 325;
-
-
+
x1 = 050;   y1 = 050;
+
x2 = 250;   y2 = 050;
+
x3 = 250;   y3 = 300;
+
x4 = 050;   y4 = 300;
+
+
-
+
@@ -119,7 +119,7 @@
Step Execution
//function for square
-
//function for rectangle
+
//function for RightangleTriangle
//function for triangle
//function for circle
From 7626c0fa67c947fef6bf32a96d66ea862d59be5a Mon Sep 17 00:00:00 2001 From: Dilip Kumar Reddy Kotte <70163818+dilipreddy003@users.noreply.github.com> Date: Sat, 5 Sep 2020 17:38:03 +0530 Subject: [PATCH 10/14] right angeled trinagle cse2 --- src/lab/exp2/simulation/function.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lab/exp2/simulation/function.js b/src/lab/exp2/simulation/function.js index 9d494050..6219bb4c 100644 --- a/src/lab/exp2/simulation/function.js +++ b/src/lab/exp2/simulation/function.js @@ -178,12 +178,12 @@ window.view = { options4[i].checked = false } if ( a !== '2') - alert('Incorrect value of input variables(arguments). Calculating the area of a rectangle requires the length of the two different parallel sides of the rectangle. Try again.') + alert('Incorrect value of input variables(arguments). Calculating the area of a triangle requires the length of the base and height. Try again.') else if ( b !== 'float' ) - alert('Incorrect datatype of input variables(arguments). The value of the sides of a rectangle need not be integers. Try again.') + alert('Incorrect datatype of input variables(arguments). The value of the sides of a triangle need not be integers. Try again.') else if ( c !== 'float' ) alert('Incorrect datatype for return type. The value of the area of a rectangle need not be an integer. Try again.') - else if ( d !== 'a*b' ) + else if ( d !== '1/2*a*b' ) alert('Incorrect formula for calculating the area of a rectangle. Try again.') else this.approveRectangleInputs() @@ -268,7 +268,7 @@ window.view = { document.getElementById('functionSquare').innerHTML += 'float area_sq (float a)
{
  float area = a*a;
  return area;
}' }, displayFunctionForRectangle: function() { - document.getElementById('functionRectangle').innerHTML += 'float area_rect (float a,float b)
{
  float area = a*b;
  return area;
}' + document.getElementById('functionRectangle').innerHTML += 'float area_rightangledtriang (float a,float b)
{
  float area = 1/2*a*b;
  return area;
}' }, displayFunctionForTriangle: function() { document.getElementById('functionTriangle').innerHTML += 'float area_triangle (float a)
{
 float area = (sqrt(3)/4.0)*a*a;
 return area;
}' @@ -319,7 +319,7 @@ window.view = { this.correctInputs ++ }, area_rect: function( param, functionCall ) { - this.area = Number(param[0]) * Number(param[1]) + this.area = 1/2* Number(param[0]) * Number(param[1]) this.totalArea += this.area alert( 'area from function call ' + String( i + 1 ) + ' ) : ' + functionCall + ' is ' + this.area ) this.correctInputs ++ @@ -383,4 +383,4 @@ window.view = { } } -window.onload = function() { view.init() } \ No newline at end of file +window.onload = function() { view.init() } From 8fb4c3eb839e72e47a69d87fd5909cf7d0464382 Mon Sep 17 00:00:00 2001 From: Dilip Kumar Reddy Kotte <70163818+dilipreddy003@users.noreply.github.com> Date: Sat, 12 Sep 2020 12:11:23 +0530 Subject: [PATCH 11/14] changed warning text --- src/lab/exp1/simulation/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lab/exp1/simulation/index.html b/src/lab/exp1/simulation/index.html index d6ceab13..017c7252 100644 --- a/src/lab/exp1/simulation/index.html +++ b/src/lab/exp1/simulation/index.html @@ -24,7 +24,7 @@


1. Given a well-behaved smooth function, integrate it over the given limits of integration ?


2. Approximating solution to integral a smooth function.


-

3. Integration Limits are from 0 to 30, b > a and b-a >= 1.


+

3. Integration Limits are from 0 to 10


From dce4a4ffea8a5d83c6832da67ff8fc69968f0dfc Mon Sep 17 00:00:00 2001 From: Dilip Kumar Reddy Kotte <70163818+dilipreddy003@users.noreply.github.com> Date: Sat, 12 Sep 2020 12:12:55 +0530 Subject: [PATCH 12/14] changed limits --- src/lab/exp1/simulation/numericalApproximation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lab/exp1/simulation/numericalApproximation.js b/src/lab/exp1/simulation/numericalApproximation.js index 5ca76384..3b37d95e 100644 --- a/src/lab/exp1/simulation/numericalApproximation.js +++ b/src/lab/exp1/simulation/numericalApproximation.js @@ -290,8 +290,8 @@ window.view = { alert('Enter numeric value of a and b'); return false; } - else if (valueA2 >= valueB2 || valueB2 > 30) { - alert('Integration Limits are from 0 to 30, b > a and b-a >= 1'); + else if (valueA2 > 10 || valueA2 < 1 || valueB2 > 10 || valueB2 < 1) { + alert('Integration Limits are from 0 to 10'); return false; } else { From dbfab312f961d280c33a38c39aea2d4df2a7af7e Mon Sep 17 00:00:00 2001 From: Dilip Kumar Reddy Kotte <70163818+dilipreddy003@users.noreply.github.com> Date: Sat, 12 Sep 2020 12:43:09 +0530 Subject: [PATCH 13/14] validation --- src/lab/exp3/simulation/advControlFlow.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lab/exp3/simulation/advControlFlow.js b/src/lab/exp3/simulation/advControlFlow.js index 9f83de25..71fa43c3 100644 --- a/src/lab/exp3/simulation/advControlFlow.js +++ b/src/lab/exp3/simulation/advControlFlow.js @@ -34,6 +34,11 @@ window.view = { }, getInput: function() { var inputValue = document.getElementById('simpleLoopInput').value + if(inputValue<1 || inputValue>20) + { + alert('Invalid input'); + return false; + } model.inp = Number(inputValue) this.clearExecutionSection() }, @@ -377,4 +382,4 @@ window.view = { this.activateEvents() } } -window.onload = function() { view.init() } \ No newline at end of file +window.onload = function() { view.init() } From 4e7867872b67af8553934c682c9bc704994d5ed7 Mon Sep 17 00:00:00 2001 From: Dilip Kumar Reddy Kotte <70163818+dilipreddy003@users.noreply.github.com> Date: Sat, 12 Sep 2020 13:04:20 +0530 Subject: [PATCH 14/14] input validation changed disks limit to [1-10] --- src/lab/exp9/simulation/JS/recursion.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lab/exp9/simulation/JS/recursion.js b/src/lab/exp9/simulation/JS/recursion.js index 1417a55b..6d100ec3 100644 --- a/src/lab/exp9/simulation/JS/recursion.js +++ b/src/lab/exp9/simulation/JS/recursion.js @@ -23,8 +23,8 @@ window.view = { alert('Enter number of disks first !') else if ( isNaN(input) === true ) alert('Number of disks must be an integer value !') - else if ( input > 5 || input % 1 !== 0 ) - alert('Only integral value (Greater than equal to 1 and less than equal to 5) is accepted !') + else if ( input > 10 || input < 1 ) + alert('Invalid Input') else { this.disableElement('btnOk') this.enableElement('btnStart') @@ -290,4 +290,4 @@ window.view = { this.activateEvents() } } -window.onload = function() { view.init() } \ No newline at end of file +window.onload = function() { view.init() }