#This is my PYTHON program
import math;
K=2;
L=3;
x=y=a=b=float();
n=int();
print("Please enter number of x(1,2,3)");
n=int(input());
switcher={
1: -0.346,
2: 5.249,
3: 0.219
}
x = switcher.get(n,"Invalid number");
print("x=",x);
if (math.tan(x)-2*math.sin(x))<0:
print ("ERROR: the negative value in square roоt\n");
else:
if math.cos(x)==0:
print("ERROR: division by zero\n");
else:
a=math.sqrt(math.tan(x)-2*math.sin(x));
print ("Result is a=",a,"\n");
if x<=0:
print("ERROR: log10(x) is not defined for x ≤ 0\n");
else:
b=L**(2*x)+K*math.log10(x);
print("Result is b=",b,"\n");
if a>b:
y=3*a+math.exp(x);
print("Result is y=",y,"\n");
if a<=b:
y=3*b+math.exp(-1);
print("Result is y=",y,"\n");
I1RoaXMgaXMgbXkgUFlUSE9OIHByb2dyYW0KaW1wb3J0IG1hdGg7Cks9MjsKTD0zOwp4PXk9YT1iPWZsb2F0KCk7Cm49aW50KCk7CnByaW50KCJQbGVhc2UgZW50ZXIgbnVtYmVyIG9mIHgoMSwyLDMpIik7Cm49aW50KGlucHV0KCkpOwpzd2l0Y2hlcj17CiAgICAxOiAtMC4zNDYsCiAgICAyOiA1LjI0OSwKICAgIDM6IDAuMjE5Cn0KeCA9IHN3aXRjaGVyLmdldChuLCJJbnZhbGlkIG51bWJlciIpOwpwcmludCgieD0iLHgpOwppZiAobWF0aC50YW4oeCktMiptYXRoLnNpbih4KSk8MDoKCXByaW50ICgiRVJST1I6IHRoZSBuZWdhdGl2ZSB2YWx1ZSBpbiBzcXVhcmUgcm/QvnRcbiIpOwplbHNlOgoJaWYgbWF0aC5jb3MoeCk9PTA6CgkJcHJpbnQoIkVSUk9SOiBkaXZpc2lvbiBieSB6ZXJvXG4iKTsKCWVsc2U6CgkJYT1tYXRoLnNxcnQobWF0aC50YW4oeCktMiptYXRoLnNpbih4KSk7CgkJcHJpbnQgKCJSZXN1bHQgaXMgYT0iLGEsIlxuIik7CmlmIHg8PTA6CglwcmludCgiRVJST1I6IGxvZzEwKHgpIGlzIG5vdCBkZWZpbmVkIGZvciB4IOKJpCAwXG4iKTsKZWxzZTogCgliPUwqKigyKngpK0sqbWF0aC5sb2cxMCh4KTsKCXByaW50KCJSZXN1bHQgaXMgYj0iLGIsIlxuIik7CmlmIGE+YjoKCXk9MyphK21hdGguZXhwKHgpOwoJcHJpbnQoIlJlc3VsdCBpcyB5PSIseSwiXG4iKTsKaWYgYTw9YjoKCXk9MypiK21hdGguZXhwKC0xKTsKCXByaW50KCJSZXN1bHQgaXMgeT0iLHksIlxuIik7