Python Program For Matrix Addition and Subtraction

  Рет қаралды 77,277

Amulya's Academy

Amulya's Academy

Күн бұрын

Пікірлер: 100
@8dwale990
@8dwale990 4 жыл бұрын
best teacher.. knowledge is appreciable and your voice is so melodious too. enjoying learning from here.
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@bishalchatterjee745
@bishalchatterjee745 3 жыл бұрын
Moat underrated channel for python
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you 😊
@vellaiyan.m0556
@vellaiyan.m0556 5 жыл бұрын
(1:44) 3rows and 2 columns
@cheppanu_brother
@cheppanu_brother Жыл бұрын
Thanks a lot u helped me a lot during exams
@genie9262
@genie9262 3 жыл бұрын
I've been trying to get the input from the users ,I watched this and completely understood the concept ,thank you ,I'm so happyyyy
@nitinrawat7581
@nitinrawat7581 5 жыл бұрын
Thank you for this video.....I was waiting eagerly. I hope you will provide some good questions on matrices.
@SujalSingh2006
@SujalSingh2006 2 жыл бұрын
Thank you very much mam. It helped us a lot for our Group Assignment. Again Thank you so much❤❤❤🥰
@pradeepjungkarki4510
@pradeepjungkarki4510 2 жыл бұрын
very nicely explain thank you best wishes from nepal
@jaheerkalanthar816
@jaheerkalanthar816 4 жыл бұрын
Good teacher, Super mam ,Nice way of teaching,more than thaat Your voice is awesome
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@karthikeyan-gy8tn
@karthikeyan-gy8tn 3 жыл бұрын
Mam I use [[int(input() for i in range(row)]for j in range(col)] It give me same result when I interchanged col and row as u mentioned in this video I tried both its Gove same result
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Give me the program 😊
@abhishekr3688
@abhishekr3688 3 жыл бұрын
Mam, please make more videos on Python Programming!
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Sure 😊
@designers_rockwall
@designers_rockwall 3 жыл бұрын
for i in range (infinity): print("YOUR AMAZING MAN LOVE U❤")
@fardoushemal2622
@fardoushemal2622 4 жыл бұрын
your teaching method is very nice. But the subtitle is needed
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Ok I will remember that :)
@nivruttiraut1839
@nivruttiraut1839 4 жыл бұрын
can you please explain why u use format function and how to use it
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
To format the string or number :) Video link: kzbin.info/www/bejne/gmKclmhpoKqWn6s
@robishankardenre3269
@robishankardenre3269 5 жыл бұрын
Thank you 🙂🙏🇮🇳
@yunicoardianpradana7288
@yunicoardianpradana7288 2 жыл бұрын
wow you really helped me.....thank you
@selvanm2872
@selvanm2872 5 жыл бұрын
thank you so much
@sanjaybalasubramanian9468
@sanjaybalasubramanian9468 5 жыл бұрын
Hey Amulya... I don't understand how the matrix list works (looks like a list comprehension) Can you explain it? If it is a list comprehension, can we get input from inside of the list? Please explain... And your videos are amazing and I love the way you teach
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
here we are treating nested list as matrix. Yes in the program to enter value to the nested list(matrix) we used list comprehension method. matrix1 = [ [ int(input() for loop for column)] for loop for row ] this is the syntax. :)
@sanjaybalasubramanian9468
@sanjaybalasubramanian9468 5 жыл бұрын
@@AmulsAcademy Thanks Amulya...
@genie9262
@genie9262 3 жыл бұрын
You're amazing✌
@Sunil_KumarDas
@Sunil_KumarDas 4 жыл бұрын
Can anyone help me with 3 line! I am confused of why 'col' is taken first in 'for' loop! 'for' loop works for eg.: # for i in [1,2]: for j in [3,4,5]: print([i][j]) # Output: [[1,3], [1, 4], [1, 5], [2,3]...] _______ If I need to input 2×3 matrix, why can't I put "row" in first "for" loop?
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
i will explain this with list comprehension. when you take [0 for i in range(5) ] we will get output as [0,0,0,0,0] this is 1×5 array/list here, now if i want 3×5 list then i need to [0 for i in range(5) ]repeat this thrice/we need to loop this thrice. [[0 for i in range(5) ] for j in range(3)].
@Sunil_KumarDas
@Sunil_KumarDas 4 жыл бұрын
@@AmulsAcademy How it will look using regular for loops ma'am? Thanks
@ramyaparuchuri
@ramyaparuchuri 4 жыл бұрын
Could you please explain the for loop logic : [[int(input()) for i in range(col)] for j in range(row)]
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
When you use [int(input()) for i in range(col)] it will given you a list with values. for example col=3 if i enter input as 0 then we will get [0,0,0] as output. but here we want nested list for matrix because matrix is 2d so we will use nested list here. [[int(input()) for i in range(col)] for j in range(row)] if row=4 then i will get [0,0,0] 4 times. [[0,0,0],[0,0,0],[0,0,0],[0,0,0]] :)
@ramyaparuchuri
@ramyaparuchuri 4 жыл бұрын
@@AmulsAcademy Thank you for your quick response :)
@gayathri-8-i6s
@gayathri-8-i6s 3 жыл бұрын
@@AmulsAcademy if row =4 0 0 0 0 Like this only??? Am I correct???
@karthikeyan-gy8tn
@karthikeyan-gy8tn 3 жыл бұрын
@@gayathri-8-i6s yes but we can use [[int(input()) for i in range(row)]for j in range(col)] Or we can use [[Int(input()) for i in range(col)]for j in range(row)] We can use both output is same
@gayathri-8-i6s
@gayathri-8-i6s 3 жыл бұрын
@@karthikeyan-gy8tn thanks a lot
@arjunindia990
@arjunindia990 2 жыл бұрын
why u have not used list comphrension method for adding the matrices ? and why r u writing the for loop when u have given the necessary code for matrix1 and 2 in list comphrension method ?
@kareemsaheb5438
@kareemsaheb5438 5 жыл бұрын
Amulya can u please make a video on stack ,linkedlist, queues...in python
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
I will try :)
@kareemsaheb5438
@kareemsaheb5438 5 жыл бұрын
@@AmulsAcademy no one had made a video on python data structure..u make a video it is useful for every one .. tq mam thanks for ur reply
@ankurdighway9611
@ankurdighway9611 4 жыл бұрын
Can we write this: matrix1=[ [ int( input( ) ) for i in range(row) ] for j in range(col) ] insteaad of matrix1=[ [ int( input( ) ) for i in range(col) ] for j in range(row) ] If not then what is the reason behind this?
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
You can write like this but you will get row number of column and col number of row in your output :)
@-ILIYAJ
@-ILIYAJ 4 жыл бұрын
plzz start java programme language tutorial
@ashokrajann9351
@ashokrajann9351 4 жыл бұрын
In list comprehension why we are giving Column first?
@mananchawla4751
@mananchawla4751 4 жыл бұрын
So that we can use matrices which are not necessarily square
@1zhann184
@1zhann184 4 жыл бұрын
@@mananchawla4751 how? can you explain step by step?
@rutwickalyan8003
@rutwickalyan8003 5 жыл бұрын
Thank you.
@venkateshkoneti2116
@venkateshkoneti2116 2 жыл бұрын
if we giving the negative value it showing error, how we write global solution.
@AJ-st5tj
@AJ-st5tj 5 жыл бұрын
Hi amulya , can u pls make a video on functions ..u have made basic video ..pls make a video on....how functions can be called inside a function .how var in one functn n accessed with other function in python ...it's a request ,
@kareemsaheb5438
@kareemsaheb5438 5 жыл бұрын
Watch closures video in amuls academy
@kireetikesani9422
@kireetikesani9422 4 жыл бұрын
Madam,please expalin the list comprehension of matrix1 varaible.I seen the previous videos of list comprehension,This kind of example not present in the previous list comprehension video
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
[[int(input()) for i in range(col)] for j in range(row)] here first [int(input()) for i in range(col)] this will be executed. if i enter col as 4, it will take 4 value for column. { 4 times it will execute int(input()) and we will get 4 integer input } Next, for j in range(row) this for loop will execute. it will run [int(input()) for i in range(col)] this row times {if row is 3 it will run for loop 3 times.}
@kireetikesani9422
@kireetikesani9422 4 жыл бұрын
Thank U madam for your kind Replay
@gayathri-8-i6s
@gayathri-8-i6s 3 жыл бұрын
Sisy...can you please explain each and every line with a example plzzzxx
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Each line explanation for matrix addition and subtraction .?
@willywonka7166
@willywonka7166 4 жыл бұрын
Mam please consider the programs with lesser time complexity!
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Sure :)
@rakeshkumari1055
@rakeshkumari1055 3 жыл бұрын
very good
@1zhann184
@1zhann184 4 жыл бұрын
why do in list comprehension does column for loop comes first and row for loop second while printing its the opposite? also massive respect to you me lady
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
if you use single list [ 0 for i in range(5)] it will create [0,0,0,0,0] that is the one row right now if i want 4 rows like that i need to write [[0 for i in range(5)] for j in range(4)] :)
@debojitmandal8670
@debojitmandal8670 3 жыл бұрын
Mam I am unable to follow this so can I use Numpy insted of this
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Yes :)
@gayathri-8-i6s
@gayathri-8-i6s 3 жыл бұрын
I have a doubt Y we r inputting matrix 1 as for i in range(col) for i in range (row) Y col first and row second And my another doubt is in for loop , for i in range(row) and for j in range (col) y row is first and col is second Y I can't use both as for i in range (row) first and for j in range (col) next Clear my doubt Sisy...
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
For your first question : If I use [0 for i in range(5)] we will get [0,0,0,0,0] Now we got one row and 5 column and now if we want to print this in 4 rows then we need to take another for loop for that. [[0 for i in range(5)] for j in range(4)] I is column here and j is row. So first take for loop for column then take for loop to print how many row you want 😊 Now for the second question: Here we want to print row0 col0 col1 col 2 col3 col4 After that we need to go to second row (row1) That’s why here outer for loop is for loop for row and inner for loop is for loop for column 😊
@gayathri-8-i6s
@gayathri-8-i6s 3 жыл бұрын
@@AmulsAcademy I understand first one. But not second
@-SrinikethanSm
@-SrinikethanSm 4 жыл бұрын
At time line 5min why you use "
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
To print values of matrix in a proper manner here i am formatting the values. To know more learn about format()
@anushanaidu886
@anushanaidu886 2 жыл бұрын
Voice ❤️💃
@kireetikesani9422
@kireetikesani9422 4 жыл бұрын
Thank you madam
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
You’re welcome 😊
@charu4963
@charu4963 4 жыл бұрын
Why we are using "end"???
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
To print the number in same line :)
@charu4963
@charu4963 4 жыл бұрын
Mam...If we didn't use end it will print one by one ah..
@yourcellularuniverse3235
@yourcellularuniverse3235 3 жыл бұрын
@@charu4963 yes it will print one by one Because by default...end 's value is new line.. we need to give space " " so that it's printed in same line. If u have given 2 it would have printed 2 after every number phypythonics.wordpress.com/contents/ You can check out the website
@imsubashmj
@imsubashmj 5 жыл бұрын
please make a playlist for *Django*
@divyanshmalik8979
@divyanshmalik8979 4 жыл бұрын
can you pleas explain the concept of end=' '
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
end is the parameter in the print(), default value is that is new line. when i write print("hello") it will print message hello and goto the next line {because default value of end = " "} But if we want print stars or number in the same line then we can use end="" :)
@divyanshmalik8979
@divyanshmalik8979 4 жыл бұрын
Thank you so much
@PraveenKumar-gd1tx
@PraveenKumar-gd1tx 4 жыл бұрын
Sir if two matrices are given and we want to add them what is the code for that???
@Flowereacer89
@Flowereacer89 3 жыл бұрын
Tedious approach Gosh
@kireetikesani9422
@kireetikesani9422 4 жыл бұрын
Madam,I cant understand the List comprehension can you please tell me in detail in the comment box
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
I made few videos on list comprehension you can watch that :) kzbin.info/www/bejne/Z2jKhXqnfaxorrM kzbin.info/www/bejne/nJ-tgHWHl8hqh8k kzbin.info/www/bejne/gHbEoX-Eh9qtjNE :)
@praveenchandra340
@praveenchandra340 4 жыл бұрын
We can also do it easily using numpy.
@043mala.s8
@043mala.s8 3 жыл бұрын
In the 4 line... i in range col and j in range row.. Ana next line la... i in range row and j in range in col.. Nu iruku.... Athu konjam explain paniringala
@eminjaziri3266
@eminjaziri3266 3 жыл бұрын
can u post the code
@SwaggyCheeseDog
@SwaggyCheeseDog 4 жыл бұрын
I keep getting an error saying that the INT is not subscriptable
@anishmehta3984
@anishmehta3984 5 жыл бұрын
In list comprehension. for i in range(col) for j in range(row) but i is for row and j is for col? is it condition to make row=col?
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
i and j are variables you can take any variable name here . :)
@anishmehta3984
@anishmehta3984 5 жыл бұрын
@@AmulsAcademy got it thanks.
@Flowereacer89
@Flowereacer89 3 жыл бұрын
OMG why does this video even has dislikes
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
😊😊
@gayathri-8-i6s
@gayathri-8-i6s 3 жыл бұрын
This video is somewhat confusing me... Can you explain each and every for loop plz....
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
I will give you simple tip Write down the program in a paper and trace the program, you will understand the flow of the programs 😊
@blogsoft6280
@blogsoft6280 4 жыл бұрын
Wowwww
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
Python Program For Matrix Multiplication
19:10
Amulya's Academy
Рет қаралды 80 М.
FLAMES Game - Python Program | Interview Question
25:59
Amulya's Academy
Рет қаралды 26 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 198 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Python Program To Find Transpose Of A Matrix
12:41
Amulya's Academy
Рет қаралды 36 М.
10 Python Comprehensions You SHOULD Be Using
21:35
Tech With Tim
Рет қаралды 161 М.
Python Programs - Factorial Program Using Recursion
18:08
Amulya's Academy
Рет қаралды 75 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,2 МЛН
Nested Dictionaries in Python | Python Tutorials for Beginners #lec69
22:33
Jenny's Lectures CS IT
Рет қаралды 43 М.
Python Pattern Program - Number Pattern (Printing Numbers in Pyramid Shape)
11:28
Python Program To Find out the Maximum Value in Nested List
9:20
Amulya's Academy
Рет қаралды 31 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 198 МЛН