I want to test a 2x2 matrix of [[5,6],[7,8]] to see if it's a square.
I run my code and I'm supposed to get True but I got False instead...
def square(sq):
for element in sq:
if element:
return False
return True
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)