"Welcome to MV Code Guide, your ultimate destination for mastering Python programming! Join our vibrant community as we explore the core concepts of Python, tackle exciting projects, and access valuable materials on our blog.
Our meticulously crafted video tutorials cover the fundamental concepts of Python, providing a solid foundation for beginners and a refresher for experienced coders. From variables and control structures to functions and object-oriented programming, we'll guide you through every step of your Python learning journey.
But we don't stop at theory alone! Our channel showcases inspiring Python projects that demonstrate the language's versatility. Dive into data analysis, machine learning projects that challenge and excite.
To enhance your learning experience, our blog offers a vast collection of resources and materials. Get access to comprehensive tutorials, download code snippets, and access project files.
Hit that subscribe button, click the notification bell!
# Sum of secondary principal diagonal elements of a matrix A = [[1, 2, 3],[4, 5, 6],[7, 8, 9]] n=4 for i in range(len(A)): # Corrected for j in range(len(A[i])): # Corrected if ((i+j) == (n-1)): print(A[i][j]) sum = 0 for i in range(len(A)): for j in range(len(A[i])): if ((i+j) == (n-1)): sum = sum + A[i][j] print("sum:", sum) Output: 6 8 What is the wrong with this code mam, output coming is incorrect Please reply madam
@@rachankumar8615 Hello dear, Thanks for your query! As far as I can rectify in your code, you have put n=4 which should be 3 in your case as the matrix you have taken is 3x3 n is the number of elements in each row or column. In your case it is 3. Please correct it and try again Hope it helps!
Thank you so much..! I am sorry for not updating any videos for so long But from next week I'll be updating the rest of the content! Stay connected! Thanks again!
This is highly motivating comment.. thanks a tonn for this.. You have given me strength to work on this channel again I promise to upload more videos very soon
Hello Mam, i have gone thru all 35 lectures of Python.. but you not covered Functions , class and object topics .. pls let me know where are these lecture in your channel.. i tried to fine but cdnt.
Hello Mam first of all i want to thank you for teaching us Python with such an easy approach. I am not from IT . I am 55 yrs of age and just started learning Python. I am sorry to say.. bit in above lecture at the end you asked to perform a task. In you soplution to the task you said that u just changed the row factor to column. thats not it mam u also changed alphabets from capital letters to small letters. so there shd be 96 instead of 64 in solution.
Hey! thank you so much for the correction 😊 I just checked, you are right it should be 96 instead of 64! Its great that you are trying to solve the problem. Am so sorry for the mistake! Keep learning 👍
Thank you for these amazing videos with excellent explanations. So far the best I have encountered. My python knowledge is less than 2 days old and I could easily understand. Much appreciated.
bytes and bytearray are mostly used in network programming where we need to encode and decode message while message passing. The string data causes privacy concerns therefore we can covert string to bytes for encoding purpose
Thank you for your appreciation! Yes, Reference variables also occupy memory separately. The methods/method calls and the references are stored in stack memory and all the values objects are stored in a private heap
Hi, I have discussed two ways to solve the problem One is using count () method ie an inbuilt function Second is without using count () method Kindly check it out If you need code, you can find it in the description box I have shared the link of my blog Thanks
Alt matrix sum You are given a chessboard of size N x N, where the top left square is black. Each square contains a value. Find the sum of values of all black square and all white squares. Remember that in a chessboard black and white squares alternate. Input User task: Input consists on N and the the numbers in the NxN matrix. You need to print out the sum of black squares and then white squares in the next line. Constraints:- 1 <= N <= 1000 1 <= Matrix[i][j] <= 100000 Output Print two lines, first line containing the sum of black squares and second line containing the sum of white squares. Example Input: 3 1 2 3 4 5 6 7 8 9 Output: 25 20 Explanation:- black square contains 1, 3, 5, 7, 9; sum = 25 white square contains 2, 4, 6, 8; sum = 20 i have tried it but test case was getting wrong can you please write a code for this in python
If I have understood your problem rightly, then here goes the solution for you mvcodeguide.blogspot.com/2020/08/counting-number-of-occurrences-of-each.html I have just updated my blog for your query. You can check it out!