filmov
tv
Week 7 Programming Assignment Solutions | The Joy of Computing using Python

Показать описание
Week 7 Programming Assignment Solutions | The Joy of Computing using Python
The Joy of Computing using Python | Week 7 Programming Assignment Solutions | NPTEL | Swayam
The Joy of Computing using Python : Week 7 Programming Assignments | NPTEL
Hi Everyone,
Welcome to "Simple Edu Talk" Channel.
Here I will provide for you NPTEL THE JOY OF COMPUTING USING PYTHON All Assignment Quiz Answers.
So please subscribe this channel and press the bell icon to get new video Notification first and then you can watch new assignment answers video.
#nptel #thejoyofcomputingusingpython #python
TOPIC
Week 7: Programming Assignment 1
Given a sqaure matrix M, write a function DiagCalc which calculate the sum of left and right diagonals and print it respectively.(input will be handled by us)
Input:
A matrix M
[[1,2,3],[3,4,5],[6,7,8]]
Output
13
13
Explanation:
Sum of left diagonal is 1+4+8 = 13
Sum of right diagonal is 3+4+6 = 13
Week 7: Programming Assignment 2
Given a matrix M of MxN write a function Transpose which accepts a matrix M and return the transpose of M.
Transpose of a matrix is a matrix in which each row is changed to a column or vice versa.
Input
A matrix M
[[1,2,3],[4,5,6],[7,8,9]]
Output
Transpose of M
[[1,4,7],[2,5,8],[3,6,9]]
Week 7: Programming Assignment 3
Given a matrix M of MxN write a function snake that accepts a matrix M and returns a list which contain elements in snake pattern of matrix M. (See explanation to know what is snake pattern)
Input
A matrix M
91 59 21 63
81 39 56 8
28 43 61 58
51 82 45 57
Output
[91, 59, 21, 63, 8, 56, 39, 81, 28, 43, 61, 58, 51, 82, 45, 57]
Explanation:
For row 1 elements are inserted from left to right
For row 2 elements are inserted from right to left
For row 3 elements are inserted form left to right
and so on
Follow Us:-
Telegram Channel Link..
Facebook:-
Twitter:-
Thank you 🌹🌹
#simpleedutalk #NPtelJoyWeek2programming #Joyweek2programminganswers
The Joy of Computing using Python | Week 7 Programming Assignment Solutions | NPTEL | Swayam
The Joy of Computing using Python : Week 7 Programming Assignments | NPTEL
Hi Everyone,
Welcome to "Simple Edu Talk" Channel.
Here I will provide for you NPTEL THE JOY OF COMPUTING USING PYTHON All Assignment Quiz Answers.
So please subscribe this channel and press the bell icon to get new video Notification first and then you can watch new assignment answers video.
#nptel #thejoyofcomputingusingpython #python
TOPIC
Week 7: Programming Assignment 1
Given a sqaure matrix M, write a function DiagCalc which calculate the sum of left and right diagonals and print it respectively.(input will be handled by us)
Input:
A matrix M
[[1,2,3],[3,4,5],[6,7,8]]
Output
13
13
Explanation:
Sum of left diagonal is 1+4+8 = 13
Sum of right diagonal is 3+4+6 = 13
Week 7: Programming Assignment 2
Given a matrix M of MxN write a function Transpose which accepts a matrix M and return the transpose of M.
Transpose of a matrix is a matrix in which each row is changed to a column or vice versa.
Input
A matrix M
[[1,2,3],[4,5,6],[7,8,9]]
Output
Transpose of M
[[1,4,7],[2,5,8],[3,6,9]]
Week 7: Programming Assignment 3
Given a matrix M of MxN write a function snake that accepts a matrix M and returns a list which contain elements in snake pattern of matrix M. (See explanation to know what is snake pattern)
Input
A matrix M
91 59 21 63
81 39 56 8
28 43 61 58
51 82 45 57
Output
[91, 59, 21, 63, 8, 56, 39, 81, 28, 43, 61, 58, 51, 82, 45, 57]
Explanation:
For row 1 elements are inserted from left to right
For row 2 elements are inserted from right to left
For row 3 elements are inserted form left to right
and so on
Follow Us:-
Telegram Channel Link..
Facebook:-
Twitter:-
Thank you 🌹🌹
#simpleedutalk #NPtelJoyWeek2programming #Joyweek2programminganswers