# Solving math problems using python (Quick Code-Python)

`a = 2b = 3area = a*bperimeter = 2 * (a+b)print(area) #printing the areaO/P : 6print(perimeter)#printing periO/P : 10`
`x = 14y = 23z = 6f = 10answer = (x — y) * z / f print (“Result =”, answer)O/P : Result = -5.4e = ((x - y) * z) / f    print("Result =",  answer)O/P : Result = -5.4e = (x - y) * (z / f);    print("Result =",  answer)O/P : Result = -5.4`
`a = 6b = 2c = a%bprint(c)O/P : 0 # number is evena = 7b = 2c = a%bprint(c)O/P : 1 # number is odd`
`#(task 1)take a number and square itx = 6y = x**2print(y)O/P : 36#(task 2) take square root of the result you get from task(1)import math #math libraryz = math.sqrt(y) #using sqrt()print(z)O/P : 6`
`a = 30area = 6 * a * avolume = a * a * aprint(area)O/P : 5400print(volume)O/P : 27000`
`# method number one: x = 6x+=1x+=1x+=1x+=1x+=1print(x)O/P : 11#method number 2x = 6x+=5 #increment 5 timesprint(x)O/P : 11`
`x = 4y = 3z = abs(x-y) * (x+y)print(z)O/P : 7`
`Celsius = 45Fahrenheit = 9.0/5.0 * Celsius + 32print(Fahrenheit)O/P : 113.0`
`kmph = 100mph =  0.6214 * kmphprint(mph)O/P : 62.13999999999999`