How to Solve using python 9.12 Lab 9D: Identity Matrix Overview Create a program that will print
Fantastic news! We've Found the answer you've been seeking!
Question:
How to Solve using python
Transcribed Image Text:
9.12 Lab 9D: Identity Matrix Overview Create a program that will print an identity matrix whose size is specified by the user Objectives To be able to get practice using nested loops. Description An identity matrix in math is a square matrix whose contents are all 0, except there are 1s down the main diagonal. For example, a 3 x 3 identity matrix looks like this: 1 0 0 0 1 0 0 0 1 and a 5 x 5 identity matrix looks like this: 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 You will first prompt the user for the size of the matrix (number of rows and columns), then print the identity matrix of that size. After printing the first matrix, you must ask the user if they want to continue as follows: Do you want to print another? You will continue to ask for a size and print an identity matrix until the user says 'n'. When the user says 'n', you should print the message "Thank you Development Suggestions 9.12 Lab 9D: Identity Matrix Overview Create a program that will print an identity matrix whose size is specified by the user Objectives To be able to get practice using nested loops. Description An identity matrix in math is a square matrix whose contents are all 0, except there are 1s down the main diagonal. For example, a 3 x 3 identity matrix looks like this: 1 0 0 0 1 0 0 0 1 and a 5 x 5 identity matrix looks like this: 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 You will first prompt the user for the size of the matrix (number of rows and columns), then print the identity matrix of that size. After printing the first matrix, you must ask the user if they want to continue as follows: Do you want to print another? You will continue to ask for a size and print an identity matrix until the user says 'n'. When the user says 'n', you should print the message "Thank you Development Suggestions
Expert Answer:
Answer rating: 100% (QA)
Every concept has been explained by adding comments to it Python Code Start an infinite while l... View the full answer
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date:
Students also viewed these programming questions
-
How to solve using 4th order Runga Kutta Method using Excel? dx = sin(x) + cos((y) dt dy cos(x) sin(y) dt x(0) = 1, y(0) = 1 h = 0.1 Solve until t = 10
-
Solve using Python spyder. The airline_delay on the right is just a snapshot of the file. explain in steps. Origin Airport: LGA STEP 1 Flights from LGA was on time 5033 times. Flights from LGA was...
-
Solve using lisp program not python or java. ( lisp emacs ) Write a function called filter-seq that takes a sequences (a string) and an alphabet a (a string), and generates a result sequence (a...
-
How would you compare the value of direct definition from friends in face-to-face conversation and strangers comments on a YouTube posting?
-
In 2014 Marquette County opened a landll that was expected to accept waste for four years. The following table indicates the estimates county ofcials made at the end of each of the four years:...
-
On January 1, Year 1, Gearty Corporation loans Olinto Fabrix, Inc. $200,000 with a 10% simple interest note payable in ten years. Interest on the note is payable annually and the principal is due at...
-
In 2001, the City of New York and the Dormitory Authority of the State of New York (DASNY) entered into an agreement to build a forensic biology laboratory in Manhattan. Per the agreement, DASNY...
-
Lorge Corporation has collected the following information after its first year of sales. Sales were $1,500,000 on 100,000 units; selling expenses $250,000 (40% variable and 60% fixed); direct...
-
1 = We know that all the statements [4] Consider the system (0.3)-(0.4) in the particular case f(r) = proven in Problem [3] apply to this case, so for example, we know that c2 7 = - 1 12 (0.6) de and...
-
In cell C11, construct a formula to calculate the annual projected street maintenance costs for the year 2025 after the projected increase of 5% is applied. Use absolute cell references as necessary....
-
Critters Pet Care, Partial Worksheet for the Month Ended February 28, 2023 Cash in Checking 2,000 Cash in saving 4,000 accounts Receivable 300 Prepaid advertising 300 quipement 1,800 Prpare the...
-
Match the example budget items to the budget term that correctly describes them. 1. $25 per month for bus fare to work 2. $30 per month for food and entertainment 3. $60 per month for my cell phone...
-
Mark each item as either O = Ordinary business Income or S = separately stated item. Then, calculate the total Ordinary Business income or Loss using the partnership information below: O or S Revenue...
-
Use figure in exercise 3.2 for 5.3 rithm. Illustrate by performing backward induction on the game tree Exercise 5.3 Explain how to handle a chance move in the BI algo- in Exercise 3.2 on page 28.
-
Rephrase the paragraph: The country's strong track record of prudent policymaking has led to robust external balance sheets, healthy public finances, and positive macroeconomic performance seen in...
-
Edwin Ho was hired by DBS after graduating summa cum laude in finance from a reputable local university. On his first day at the bank, Edwin meets Mr. Andrew Matthews from Australia who is interested...
-
Ceria Berhad acquires 100% of the equity of Kelora Berhad on 31 December 2022. There are three elements to the purchase consideration: an immediate payment of RM5,000,000, and two further payments of...
-
What are the before image (BFIM) and after image (AFIM) of a data item? What is the difference between in-place updating and shadowing, with respect to their handling of BFIM and AFIM?
-
In this exercise, you modify the program from Lab 13-2. If necessary, create a new project named Advanced35 Project and save it in the Cpp8\Chap13 folder. Also create a new source file named...
-
Cranston Berries sells three types of berries: strawberries, blueberries, and raspberries. Sales have been booming this year and are expected to increase next year. The sales manager wants a program...
-
You have just purchased a new personal computer system. Before putting the system components together, you read the instruction booklet that came with the system. The booklet contains a list of the...
-
What communication and HR practices does New Belgium use to keep employees in the loop so they feel involved with the company and part of a community? Kim Jordan and Jeff Lebesch, the husband and...
-
What do you consider to be the primary opportunities related to the issue of illegal immigrants in the workforce? State your reasoning. Illegal immigrant labor is a global HRM issue that arises from...
-
What do you consider to be the main challenges related to the issue of illegal immigrants in the workforce? State your reasoning. Illegal immigrant labor is a global HRM issue that arises from people...
Study smarter with the SolutionInn App