From b3f3a8ecd454359a2e992161844f2fb599f8238a Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Fri, 4 Oct 2019 12:24:07 +0530 Subject: Initial commit/added all books --- .../CH26/EX26.10/Ex26_10.R | 27 ++++++++++++++++++++++ .../CH26/EX26.11/Ex26_11.R | 12 ++++++++++ .../CH26/EX26.12/Ex26_12.R | 13 +++++++++++ .../CH26/EX26.13/Ex26_13.R | 18 +++++++++++++++ .../CH26/EX26.14/Ex26_14.R | 18 +++++++++++++++ .../CH26/EX26.15/Ex26_15.R | 19 +++++++++++++++ .../CH26/EX26.16/Ex26_16.R | 16 +++++++++++++ .../CH26/EX26.17/Ex26_17.R | 15 ++++++++++++ .../CH26/EX26.18/Ex26_18.R | 17 ++++++++++++++ .../CH26/EX26.2/Ex26_2.R | 17 ++++++++++++++ .../CH26/EX26.3/Ex26_3.R | 23 ++++++++++++++++++ .../CH26/EX26.4/Ex26_4.R | 21 +++++++++++++++++ .../CH26/EX26.5/Ex26_5.R | 17 ++++++++++++++ .../CH26/EX26.6/Ex26_6.R | 15 ++++++++++++ .../CH26/EX26.7/Ex26_7.R | 22 ++++++++++++++++++ .../CH26/EX26.8/Ex26_8.R | 16 +++++++++++++ 16 files changed, 286 insertions(+) create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.10/Ex26_10.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.11/Ex26_11.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.12/Ex26_12.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.13/Ex26_13.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.14/Ex26_14.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.15/Ex26_15.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.16/Ex26_16.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.17/Ex26_17.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.18/Ex26_18.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.2/Ex26_2.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.3/Ex26_3.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.4/Ex26_4.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.5/Ex26_5.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.6/Ex26_6.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.7/Ex26_7.R create mode 100644 Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.8/Ex26_8.R (limited to 'Basic_Engineering_Mathematics_by_John_Bird/CH26') diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.10/Ex26_10.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.10/Ex26_10.R new file mode 100644 index 00000000..5971b266 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.10/Ex26_10.R @@ -0,0 +1,27 @@ +#page no. 272 +#problem 10 +# formula used : #formula used : area of rectangle = l*b +#given: +l = 6 # length of building +b = 8#breadth of building + +###triangle on top +base = 8 +base_right = base/2 #base of right angle triangle +hypo = 5 +height = sqrt(hypo^2 - (base_right^2)) + +area_rect <- function(x,y) #area of rectangle +{ + a = x*y + return(a) +} + +area_triangle <- function(x,y) #area of right angle triangle +{ + a = (x*y)/2 + return(a) +} + +area_building = area_rect(l,b) + area_triangle(base,height) +print(area_building) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.11/Ex26_11.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.11/Ex26_11.R new file mode 100644 index 00000000..e943322e --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.11/Ex26_11.R @@ -0,0 +1,12 @@ +#page no.273 +#problem 11 +#formula used: area of circle = pi*r^2 + +area_circle = function(r) +{ + return(pi*r^2) +} + +#given: +r = 5 #radius of circle +print(area_circle(r)) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.12/Ex26_12.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.12/Ex26_12.R new file mode 100644 index 00000000..454812b2 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.12/Ex26_12.R @@ -0,0 +1,13 @@ +#page no.273 +#problem 12 +#formula used: area of circle = pi*r^2 + +area_circle = function(r) +{ + return(pi*r^2) +} + +#given: +dia = 15 #diameter of circle +r = dia/2 #radius of circle +print(area_circle(r)) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.13/Ex26_13.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.13/Ex26_13.R new file mode 100644 index 00000000..76480b64 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.13/Ex26_13.R @@ -0,0 +1,18 @@ +#page no.273 +#problem 13 +#formula used: area of circle = pi*r^2 + +area_circle = function(r) +{ + return(pi*r^2) +} + +radius_cir <- function(cir) +{ + r = cir/(2*pi) + return(r) +} +#given: +circ = 70 #circumference of circle +r = radius_cir(circ) #radius of circle +print(area_circle(r)) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.14/Ex26_14.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.14/Ex26_14.R new file mode 100644 index 00000000..2412e61b --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.14/Ex26_14.R @@ -0,0 +1,18 @@ +#page no. 274 +#problem 14 +# formula used : area of sector=(theta/360)*area of circle + +area_circle = function(r) +{ + return(pi*r^2) +} + +area_sector<- function(theta,r) +{ + a = (theta/360)*area_circle(r) +} + +#given: +r = 6 #radius of circle +theta = 50 # angle subtended at center +print(area_sector(theta,r)) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.15/Ex26_15.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.15/Ex26_15.R new file mode 100644 index 00000000..47924d96 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.15/Ex26_15.R @@ -0,0 +1,19 @@ +#page no. 274 +#problem 15 +# formula used : area of sector=(theta/360)*area of circle + +area_circle = function(r) +{ + return(pi*r^2) +} + +area_sector<- function(theta,r) +{ + a = (theta/360)*area_circle(r) +} + +#given: +dia = 80 #diameter of circle +r = dia/2 #radius of circle +theta = 107 # angle subtended at center(107 degree 42 minutes) +print(area_sector(theta,r)) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.16/Ex26_16.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.16/Ex26_16.R new file mode 100644 index 00000000..dac38a76 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.16/Ex26_16.R @@ -0,0 +1,16 @@ +#page no. 274 +#problem 16 +#formula used: area of circle = pi*r^2 + +area_circle = function(r) +{ + return(pi*r^2) +} + +#give: +D = 5.45 #diameter of outer circle +d = 2.25 #diameter of inner circle +R = D/2 #radius of outer circle +r = d/2 #radius of inner circle +area_shaft = area_circle(R) - area_circle(r) +print(area_shaft) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.17/Ex26_17.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.17/Ex26_17.R new file mode 100644 index 00000000..abaab8fc --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.17/Ex26_17.R @@ -0,0 +1,15 @@ +#page no. 275 +#problem 17 +# formula used : area of regular octagon =8*((1/2)*base*height) +# 8 times area of triangle + +area_triangle = function(b,h) +{ + return((b*h)/2) +} +#given: +base = 5 +H = 12 # total height across the flat +h = H/2 +area_octagon=8*area_triangle(base,h) +print(area_octagon) diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.18/Ex26_18.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.18/Ex26_18.R new file mode 100644 index 00000000..475b65a1 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.18/Ex26_18.R @@ -0,0 +1,17 @@ +#page no. 275 +#problem 18 +# formula used : area of regular hexagon =6*((1/2)*base*height) +# 6 times area of triangle + +area_triangle = function(b,h) +{ + return((b*h)/2) +} +#given: +base = 8 +b = base/2 #base of right angle triangle +hypo = base #hypotenuse of right angle triangle +h = sqrt(hypo^2 - b^2) + +area_hexagon=6*area_triangle(base,h) +print(area_hexagon) diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.2/Ex26_2.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.2/Ex26_2.R new file mode 100644 index 00000000..a70d8925 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.2/Ex26_2.R @@ -0,0 +1,17 @@ +#page n0.269 +#problem 2 +area_square <- function(x) +{ + a = x^2 + return(a) +} + +peri_square <- function(x) +{ + return(p = 4*x) + +} + +n = 4#side of square +print(area_square(n)) +print(peri_square(n)) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.3/Ex26_3.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.3/Ex26_3.R new file mode 100644 index 00000000..38ed9024 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.3/Ex26_3.R @@ -0,0 +1,23 @@ +#page no.269 +#problem 3 +#formula used : area of rectangle = l*b +# perimeter of rectangle = 2*(l+b) +#given: + +l = 7 #length of rectangle +b = 4.5 #breadth of rectangle +area_rect <- function(x,y) #area of rectangle +{ + a = x*y + return(a) +} + +peri_rect <- function(x,y) #perimeter of rectangle +{ + return(p = 2*(l+b)) + +} + +print(area_rect(l,b)) + +print(peri_rect(l,b)) diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.4/Ex26_4.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.4/Ex26_4.R new file mode 100644 index 00000000..ec157a47 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.4/Ex26_4.R @@ -0,0 +1,21 @@ +#page no. 269 +#problem 4 + +#formula used : area of parallelogram = base * perpendicular height +#given: + +l = 16 #one side of parallelogram +b = 9 #second side of parallelogram +L = 21 # distance from one point to another point (horizontally) +base = L-l #base of right angle triangle +hypo = b # hypotenuse of right angle triangle +h = sqrt(hypo^2 - base^2) + + +area_para <- function(x,y) #area of parallelogram +{ + a = x*y + return(a) +} + +print(area_para(l,h)) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.5/Ex26_5.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.5/Ex26_5.R new file mode 100644 index 00000000..4438c936 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.5/Ex26_5.R @@ -0,0 +1,17 @@ +#page no.271 +#problem 5 +#formula used : area of right angle triangle = base*height/2 + +#given: +base = 1.92 +hypo = 5.68 +height = sqrt(hypo^2 - base^2) + + +area_triangle <- function(x,y) #area of right angle triangle +{ + a = (x*y)/2 + return(a) +} + +print(area_triangle(base,height)) diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.6/Ex26_6.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.6/Ex26_6.R new file mode 100644 index 00000000..0e979a01 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.6/Ex26_6.R @@ -0,0 +1,15 @@ +#page no. 271 +#problem 6 +#formula used: area of trapezium = ((sum of parallel sides)*perpendicular distance)/2 + +#given: +l1 = 27.4 #length of one parallel side +l2 = 8.6 # length of 2nd parallel side +h = 5.5 # perpendicular distance b/w two parallel sides +area_trapezium <- function(x,y,z) #area of trapezium +{ + a = ((x+y)*z)/2 + return(a) +} + +print(area_trapezium(l1,l2,h)) diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.7/Ex26_7.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.7/Ex26_7.R new file mode 100644 index 00000000..0c57907a --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.7/Ex26_7.R @@ -0,0 +1,22 @@ +#page no. 271 +#problem 7 +# formula used : #formula used : area of rectangle = l*b +#load package ----->measurments +library(measurements) +#given: +l = 820 #length of rectangle in mm +b = 400 #breadth of rectangle in mm +area_rect <- function(x,y) #area of rectangle +{ + a = x*y + return(a) +} +area = area_rect(l,b) +#part(a) +cat("area in mm^2:",area) + +#part(b) +cat("area in cm^2:",conv_unit(area,'mm2','cm2')) + +#part(c) +cat("area in m^2:",conv_unit(area,'mm2','m2')) \ No newline at end of file diff --git a/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.8/Ex26_8.R b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.8/Ex26_8.R new file mode 100644 index 00000000..6755c459 --- /dev/null +++ b/Basic_Engineering_Mathematics_by_John_Bird/CH26/EX26.8/Ex26_8.R @@ -0,0 +1,16 @@ +#page no. 271 +#problem 8 +# formula used : #formula used : area of rectangle = l*b +#given: +L = 100 #outer length of frame +B = 50 #outer breadth of frame +w = 4 # width of frame +l = L-2*w # inner length of frame +b = B -2*w #inner breadth of frame +area_rect <- function(x,y) #area of rectangle +{ + a = x*y + return(a) +} +area_frame = area_rect(L,B) - area_rect(l,b) +print(area_frame) -- cgit