Learn Programming 101
This work is licensed under a
Creative Commons Attribution 3.0 Unported License
.
Wednesday, May 8, 2013
Check whether matrix multiplication is possible
Problem:
Given dimensions of 2 matrixes, check whether they can be multiplied.
Solution in Python:
def can_multiply(m1, n1, m2, n2):
"""
Author: Mayur P Srivastava
"""
return n1 == m2
Concepts Learned:
Maths.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment