Assignment 2 Python
Assignment 2 Python
Pavan Dange
import math
import cmath
def accept_inputs():
def arithmetic_operations():
if num2 != 0:
else:
def find_square_root():
s = (a + b + c) / 2
area = math.sqrt(s * (s - a) * (s - b) * (s - c))
def swap_numbers():
temp = x
x=y
y = temp
def quadratic_roots():
d = (b ** 2) - (4 * a * c)
def km_to_miles():
miles = km * 0.621371
def calculate_interest():
SI = P * I * N
r = I / 100
CI = P * (1 + r / n) ** (n * N) - P
def celsius_to_fahrenheit():
def main():
accept_inputs()
arithmetic_operations()
find_square_root()
swap_numbers()
quadratic_roots()
km_to_miles()
calculate_interest()
celsius_to_fahrenheit()
if __name__ == "__main__":
main()