Varanasi-Software-Junction / pythoncodecamp

Python repository for learning the language from the beginning
MIT License
10 stars 6 forks source link

Arithmetic Expressions #11

Open byutisingh opened 2 years ago

byutisingh commented 2 years ago
  1. Find SI and CI. SI=PRT/100, CI=P*(1+r/100)**T - P
  2. Find the area of a triangle, s=(a+b+c)/2, area =( s(s-a)(s-b)*(s-c))**.5
  3. Solve the Quadratic Equation Ax2 + Bx + C=0
  4. Find the Area of a Circle given the radius
  5. Given The area of a circle, find the circumference
siddhantsaxenaa commented 2 years ago
  1. Simple Interest And Compound Interest

p = int(input("Principle=")) t = float(input("time=")) r = int(input("Rate=")) si = (p r t) / 100 print('The SI is', si) ci = p*(1+r/100)**t-p print('the Compound Interest is ', ci)

siddhantsaxenaa commented 2 years ago
  1. Area of a Triangle

a = int(input("Side a = ")) b = int(input("Side b =")) c = int(input("Side c =")) s = (a + b + c) / 2 print('the s = ', s) area = (s (s - a) (s - b) * (s - c)) ** .5 print('the area of a triangle is =', a)

siddhantsaxenaa commented 2 years ago
  1. Quadratic Equation

a = int(input("Side a = ")) b = int(input("Side b =")) c = int(input("Side c =")) r1 = (-b + (bb-4a*c)0.5)/(2a) r2 = (-b - (bb-4ac)0.5)/(2*a)

print('the QE = ', r1, r2 )

siddhantsaxenaa commented 2 years ago
  1. Area of a Circle

PI = 3.14 r = float(input("Enter the radius of a circle:")) area = PI r r print("Area of a circle = %.2f" %area)

siddhantsaxenaa commented 2 years ago
  1. Circumference of a Circle

PI = 3.14 r = float(input('Enter the Radius of Circle =')) area = PI r r circumference = 2 PI r print("Area of a Circle = %.2f" %area) print("Circumference of the Circle = %.2f" %circumference)

Avinashvns commented 2 years ago
  1. Find SI and CI. SI=P_R_T/100, CI=P*(1+r/100)**T - P
  2. Find the area of a triangle, s=(a+b+c)/2, area =( s*(s-a)(s-b)(s-c))**.5
  3. Solve the Quadratic Equation Ax2 + Bx + C=0
  4. Find the Area of a Circle given the radius
  5. Given The area of a circle, find the circumference

Available operators are

kuldeepsinghvns commented 1 year ago
  1. Find the total marks and percent of 3 subjects
  2. Enter length and breadth then print area=lengthbreadth and perimeter = 2(length + breadth)
avmankit commented 1 month ago

Arithmetic Operators +,-,/,// **,%