18 lines
453 B
Python
18 lines
453 B
Python
#!/usr/bin/env python3
|
|
|
|
import numpy as np
|
|
|
|
celsius_temps = np.array([70, 75, 80])
|
|
fahrenheit_temps = (celsius_temps * 9/5) + 32
|
|
|
|
print(fahrenheit_temps) # [158. 167. 176.]
|
|
|
|
|
|
revenues = np.array([1000, 1500, 800, 2000, 1200])
|
|
costs = np.array([600, 900, 500, 1100, 700])
|
|
tax_rates = np.array([0.15, 0.18, 0.12, 0.20, 0.16])
|
|
|
|
gross_profits = revenues - costs
|
|
net_profits = gross_profits * (1 - tax_rates)
|
|
|
|
print(net_profits) # [340. 492. 264. 720. 420.] |