All problems
Orthogonality Check
Problem
Return True if vectors a and b are orthogonal, that is, their dot product is exactly 0. Otherwise return False.
Hint
The zero vector is orthogonal to everything.
Test cases
case 1
in: [[1,0],[0,1]]
expected: true
case 2
in: [[1,2],[2,-1]]
expected: true
case 3
in: [[1,2],[3,4]]
expected: false
case 4
in: [[0,0,0],[5,6,7]]
expected: true
Starter codePython
def is_orthogonal(a, b):
# Your code here
pass4 test cases · run your code against them in the editor