Hereby an example of how to write a clean class to price an option using the Black Scholes model.
from numpy import exp, sqrt, log
from scipy.stats import norm
class BlackScholes:
def __init__(
self, time_to_maturity: float, strike: float, current_price: float, volatility: float, interest_rate: float,......