HackerRank- Python Dot and Cross




Compute matrix product of two arrays



  1. import numpy as np
  2. n = int(input())
  3. a = np.array([input().split() for _ in range(n)], int)
  4. b = np.array([input().split() for _ in range(n)], int)
  5. print(np.dot(a, b))




codesadda.com

Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube