#importing modules
import math
from __future__ import division
#Variable declaration
a=10+(1/2);
b=8+(1/2);
c=6;
d=7;
e=6;
f=4;
#Calculation
result=a-(b+(c-(d-(e-f))));
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=0.75;
b=0.25;
#Calculation
#given question is (a*a)+(b*b)+(2*a*b) which can be solved using (a+b)**2
result=(a+b)**2;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=0.87;
b=0.13;
#Calculation
Nr=(a**3)+(b**3);
Dr=(a**2)+(b**2)-(a*b);
result=Nr/Dr;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=9840;
b=410;
#Calculation
result=(a/b)**2;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=40;
b=30;
c=10;
#Calculation
x=((a**2)-(b**2))/c; #required number
#Result
print "required number is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=3;
b=4;
c=6;
d=9;
#Calculation
p=b+c-d;
x=a**p; #required number
#Result
print "required number is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=2;
b=math.sqrt(2);
#Calculation
c=1/(a+b);
d=1/(b-a);
result=a+b+c+d;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
x=7;
y=5;
z=2;
#Calculation
xstary=((x+z)**2)*(y-z);
#Result
print "result is",xstary
#importing modules
import math
from __future__ import division
#Variable declaration
a=121;
#Calculation
m=math.sqrt(a);
#since we are considering square root, value of n will be 2
n=2;
result=(m-1)**(n+1);
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
k=1;
x=3*k;
y=4*k;
#Calculation
result=(6/7)+((y-x)/(y+x));
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
rootxminusrooty=1;
rootxplusrooty=17;
#Calculation
#we get value of rootx and rooty by adding and subtracting the 2 equations
rootx=(rootxminusrooty+rootxplusrooty)/2;
rooty=(rootxplusrooty-rootxminusrooty)/2;
result=rootx*rooty;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=12;
b=0.2;
c=3.6;
d=2;
#Calculation
x=a*b*c*d;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=7;
b=18;
c=84;
#Calculation
x=((c/b)**2)/7;
#Result
print "result is",round(x,2)
#importing modules
import math
from __future__ import division
#Variable declaration
a=256;
b=2;
#Calculation
c=math.log(a)/math.log(b);
x=math.log(c)/math.log(b);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=13;
b=2;
c=4;
#Calculation
d=math.log(c)/math.log(b);
e=d*b;
x=(a-e);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=3*math.sqrt(27);
b=math.sqrt(75);
c=math.sqrt(12);
#Calculation
x=a-b+c;
#Result
print "result is",x/math.sqrt(3),"*math.sqrt(3)"
#importing modules
import math
from __future__ import division
from fractions import Fraction
#Variable declaration
a=8+(1/4);
b=8+(1/2);
c=20+(1/8);
#Calculation
x=c-(a+b);
y=x-int(x);
#Result
print "result is",int(x),Fraction(y)
#importing modules
import math
from __future__ import division
#Variable declaration
a=math.sqrt(1296);
b=2.25;
#Calculation
c=a*b;
x=math.sqrt(c);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=124.9;
b=63.15;
c=65/100;
#Calculation
d=a-b;
x=d/c;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=17;
aplusb=23;
#Calculation
b=aplusb-a;
result=aplusb/(a-b);
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=math.sqrt(24);
b=math.sqrt(216);
c=math.sqrt(96);
#Calculation
x=(a+b)/c;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
x=5;
y=-2;
#Calculation
result=(x-(2*y))**(1/y);
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=2+(2/3);
b=4/5;
c=1/6;
#Calculation
result=a/(b*c);
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=5/6;
b=1/20;
c=24;
d=4/7;
e=14;
f=2+(1/4);
#Calculation
r1=a*b*c; #value of 5/6 of 1/20 of 24 rupees(rupee)
r2=d*e*f; #value of 4/7 of 14 of 2 1/4 kg(kg)
#Result
print "value of 5/6 of 1/20 of 24 rupees is",r1,"rupee"
print "value of 4/7 of 14 of 2 1/4 kg is",r2,"kg"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
a=11;
b=2+(1/5);
c=11/5;
d=2+(1/2);
e=2;
#Calculation
r1=a/b;
r2=r1/c;
result=(r2*d)-e;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=2/3;
b=1/5;
c=1/10;
d=4/5;
e=1/8;
f=1/2;
#Calculation
Nr=a+b-c;
Dr=(d*e)+f;
result=Nr/Dr;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=18;
b=162;
c=1;
#Calculation
x2=a*b*c;
x=math.sqrt(x2);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=0.55;
b=0.07;
c=0.027;
d=0.01;
#Calculation
Nr=(a**2)+(b**2)+(c**2);
Dr=d*Nr;
result=Nr/Dr;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=137;
b=133;
#Calculation
Nr=(a**3)+(b**3);
Dr=(a**2)-(a*b)+(b**2);
result=Nr/Dr;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=20.25;
b=2.8;
c=28.35;
#Calculation
result=a*b/c;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=54;
b=66;
c=33;
#Calculation
r=a/b;
result=r/c;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=916;
b=16;
c=4;
#Calculation
r=a*c/b;
#Result
print "result is",r
print "hence middle digit is 2"
#importing modules
import math
from __future__ import division
#Variable declaration
a=0.011;
b=10;
#Calculation
x=b*(a**2);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=67.6;
b=0.26;
#Calculation
x=a/(b**2);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=0.324;
b=10;
#Calculation
x=math.sqrt(a/b);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=63;
b=36;
#Calculation
r1=(a+b)**2;
r2=(a-b)**2;
Nr=r1+r2;
Dr=(a**2)+(b**2)
x=Nr/Dr;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=44.6;
b=2.5;
#Calculation
x=a*b;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=14;
b=46;
c=11;
d=6;
e=4;
#Calculation
Nr=(a**2)-b;
Dr=(c*d)-(e**2);
x=Nr/Dr;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=2002;
b=10.10;
#Calculation
x=a-(a/b);
#Result
print "result is",int(x)
print "answer given in the book varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
a=8;
b=3;
c=4;
d=2;
e=6;
f=5;
g=8;
#Calculation
Nr=a-(b*c)+d;
Dr=-(e*f)+(b*g);
x=Nr/Dr;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=4;
b=3;
c=2;
d=5;
e=0;
#Calculation
p=(a*b)-(b*c)+(d*e); #power is calculated using indices
x=a**p;
y=math.log(x)/math.log(a);
#Result
print "result is",x,"or",a,"**",int(y)
#importing modules
import math
from __future__ import division
#Variable declaration
a=1;
b=25/144;
c=12;
#Calculation
r=math.sqrt(a+b);
x=(r-a)*c;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
b=1;
a=2;
#Calculation
x1=a-b;
x2=a+b;
result=(x1/x2)+(2/3);
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=18;
b=14;
c=84;
#Calculation
x=(c**2)/(a*b);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=243;
b=0.8;
c=0.4;
#Calculation
p=b-c;
x=a**p;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=1.2;
b=0.8;
#Calculation
x=(a**2)+(b**2)+(2*a*b);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=64/121;
b=9/64;
c=8/11;
d=3/8;
#Calculation
x=(a-b)/(c+d);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=0.1;
b=0.75;
c=2.5;
d=0.05;
e=0.125;
f=1/4.8;
#Calculation
r1=(a+b)/(c+d);
x=r1/(e+f);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=1/246;
b=2/3;
c=1/27;
d=4/3;
#Calculation
r1=a**(-b);
r2=c**(-d);
x=r1/r2;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=8;
b=5/3;
c=125;
d=2/3;
#Calculation
r1=a**b;
r2=c**(-d);
x=r1/r2;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=6;
b=-2;
c=81;
d=-3/4;
#Calculation
r1=1/(a**b);
r2=c**d;
x=r1*r2;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=math.sqrt(147);
b=math.sqrt(27);
c=math.sqrt(3);
#Calculation
x=(a+b)/c;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=math.sqrt(98);
b=math.sqrt(50);
c=math.sqrt(2);
#Calculation
x=(a-b)/c;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=math.sqrt(9/25);
b=3+(1/16);
c=math.sqrt(b);
#Calculation
x=a+c;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=math.sqrt(0.01);
b=math.sqrt(0.0064);
#Calculation
x=a+b;
#Result
print "result is",x
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
a=25.6;
b=36.1;
c=12.1;
d=81;
e=0.1;
#Calculation
r1=math.sqrt(a/b);
r2=math.sqrt(c/(d*e));
x=r1/r2;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
N=51;
#Calculation
#to express a number as the difference of squares of 2 numbers, we use the formula N=((N+1)/2)**2-((N-1)/2)**2
a=(N+1)/2;
b=(N-1)/2;
#N can be expressed as (a**2)-(b**2)
#Result
print "51 can be expressed as",int(a),"**2 - ",int(b),"**2"
#importing modules
import math
from __future__ import division
#Variable declaration
a=7;
b=11;
c=1232;
#Calculation
x2=a*b*c;
x=math.sqrt(x2);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=3+(1/4);
b=4+(1/3);
#Calculation
Nr=(a**4)-(b**4);
Dr=(a**2)-(b**2);
result=math.sqrt(Nr/Dr);
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=2/9;
b=8;
#Calculation
x=b/(a**2); #total score in innings
#Result
print "total score in innings is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=64;
b=32;
c=-1/2;
d=4/5;
#Calculation
r1=(1/a)**0;
r2=a**c;
r3=b**d;
result=r1+r2+r3;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=243;
b=0.12;
c=0.08;
#Calculation
p=b+c;
result=a**p;
#Result
print "result is",result
#importing modules
import math
from __future__ import division
#Variable declaration
a=2;
b=64;
#Calculation
c=math.log(b)/math.log(a);
n=c*a;
#Result
print "result is",n
#importing modules
import math
from __future__ import division
#Variable declaration
a=1/216;
b=2/3;
#Calculation
x=1/(a**b);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=-2;
#Calculation
b=a**a;
x=b**a;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=11+(1/3);
b=4+(8/10);
c=22+(2/3);
#Calculation
x=a*b/c;
#Result
print "result is",x
#importing modules
import math
from __future__ import division
#Variable declaration
a=1.06;
b=0.04;
c=4;
#Calculation
r1=(a+b)**2;
x=r1-(4*a*b);
#Result
print "result is",x
#importing modules
import math
from __future__ import division
from fractions import Fraction
#Variable declaration
a2plusb2=45;
ab=18;
#Calculation
Nr=math.sqrt(a2plusb2+(2*ab));
result=Nr/ab;
#Result
print "result is +/-",Fraction(result)
#importing modules
import math
from __future__ import division
#Variable declaration
#by comparing the equations we get
rootx=2;
#Calculation
x=rootx**2;
#Result
print "result is",x