2. Traverse through matrix z and print all of the elements as well as identifying if the number is odd or even. Following the format "z [i][j] is e. It is an odd/even number." where i and j are the indices, and e is the element.
2. Traverse through matrix z and print all of the elements as well as identifying if the number is odd or even. Following the format "z [i][j] is e. It is an odd/even number." where i and j are the indices, and e is the element.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Using python answer #2
![Given the following array and matrices
x = [[23, 65, 96], [56, 2, 1, [[25], 43, 29]]]
y = [[1, 2, 3],
[5, 6, 7],
[9, 10, 11]]
z = [[31, 32, 33],
[55, 56, 57],
[19, 10, 11]]
1. Directly access the numbers 65, 1, 43, and 25 in array x.
2. Traverse through matrix z and print all of the elements as well as identifying if the
number is odd or even. Following the format "z [i] [j] is e. It is an odd/even number."
where i and j are the indices, and e is the element.
3. Matrix arithmetic - perform matrix operations on y and z.
Create a function for each operation and provide sample runs taking y and z as input.
Again, focus on use of loops and not built-in functions/operators.
A. y + z
B. Zy
C. y* z (just do a simple element-wise multiplication, you'll
tackle dot and cross products later!)
Notes:
• You are not allowed to use any additional libraries or imports.
o Reasoning behind is that we all know there exists a library or function for
each of these. But the main point is all about figuring and building out an
approach, a solution, a simple algorithm given the limitations and your
understanding of the nature of the data structure.
J
• Do not rely on input(). Crea.e your test statements after you define your functions.
Provide ample comments as you see fit.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4a6339b5-ec27-4bba-b13e-77ebe109977a%2Fb4701735-803f-4d55-9ac2-eca47581fa10%2Fi21czo_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Given the following array and matrices
x = [[23, 65, 96], [56, 2, 1, [[25], 43, 29]]]
y = [[1, 2, 3],
[5, 6, 7],
[9, 10, 11]]
z = [[31, 32, 33],
[55, 56, 57],
[19, 10, 11]]
1. Directly access the numbers 65, 1, 43, and 25 in array x.
2. Traverse through matrix z and print all of the elements as well as identifying if the
number is odd or even. Following the format "z [i] [j] is e. It is an odd/even number."
where i and j are the indices, and e is the element.
3. Matrix arithmetic - perform matrix operations on y and z.
Create a function for each operation and provide sample runs taking y and z as input.
Again, focus on use of loops and not built-in functions/operators.
A. y + z
B. Zy
C. y* z (just do a simple element-wise multiplication, you'll
tackle dot and cross products later!)
Notes:
• You are not allowed to use any additional libraries or imports.
o Reasoning behind is that we all know there exists a library or function for
each of these. But the main point is all about figuring and building out an
approach, a solution, a simple algorithm given the limitations and your
understanding of the nature of the data structure.
J
• Do not rely on input(). Crea.e your test statements after you define your functions.
Provide ample comments as you see fit.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY