7 kyu

Swap Row In Certain Columns of a Matrix

Description:

In this kata, you will need to make a function that can swap the rows of specified matrices. Example:

matrix = [[0, 1],
          [2, 3]]
          
swap(matrix, 0, 1, 0) # Matrix, 1st row to swap, 2nd row to swap, columns

should return

[[2, 1],
 [0, 3]]

because the 0th row is being swaped with the 1st row, but only in the 0th column.

Matrix
Linear Algebra
Puzzles

More By Author:

Check out these other kata created by ChaiTeaNunes

Stats:

CreatedMay 8, 2016
PublishedMay 8, 2016
Warriors Trained237
Total Skips6
Total Code Submissions323
Total Times Completed146
Python Completions146
Total Stars4
% of votes with a positive feedback rating88% of 45
Total "Very Satisfied" Votes36
Total "Somewhat Satisfied" Votes7
Total "Not Satisfied" Votes2
Total Rank Assessments36
Average Assessed Rank
7 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • ChaiTeaNunes Avatar
  • dfhwze Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad