Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
codebasics
GitHub Repository: codebasics/deep-learning-keras-tf-tutorial
Path: blob/master/4_matrix_math/4_matrix_math_exercise_solution.ipynb
1141 views
Kernel: Python 3
import numpy as np

Solution 1: Convert USD revenues to INR

revenues_usd = np.array([[200,220,250],[68,79,105],[110,140,180],[80,85,90]]) revenues_inr = 75*revenues_usd revenues_inr
array([[15000, 16500, 18750], [ 5100, 5925, 7875], [ 8250, 10500, 13500], [ 6000, 6375, 6750]])

Solution 2: Calculate total flowers sale every month for divine flowers shop

units_sold = np.array([[50,60,25],[10,13,5],[40,70,52]]) price_per_unit = np.array([20,30,15])
total_sales_amount = np.dot(price_per_unit,units_sold) total_sales_amount
array([1900, 2640, 1430])