Question
Given the elements of a 3 × 3 matrix as the nine variables a11, a12, ......
Given the elements of a 3 × 3 matrix as the nine variables a11, a12, ... a33,
produce a string representation of the matrix using formatting methods, (a) assuming
the matrix elements are (possibly negative) real numbers to be given to one decimal
place; (b) assuming the matrix is a permutation matrix with integer entries taking the
values 0 or 1 only. In the Python language.
Answers
# (a) # negative real number with one decimal digit from numpy import * mat = array([[-1.2, -3.4, -5.4],[-0.2, -0.1, -4.1],[-9.8, -9.5, -9.7]]) for i in range(len(mat)): for j in range(len(mat[i])): print(str(mat[i][j]), end = ' ')
# (b) # integer with 1 or 0 values from numpy import * mat = array([[1, 0, 0],[0, 1, 1],[1, 1, 1]]) for i in range(len(mat)): for j in range(len(mat[i])): print(str(mat[i][j]), end = ' ')
Similar Solved Questions
1 answers
Two fences in a field meet at 120 degrees
Two fences in a field meet at 120 degrees. A cow is tethered at their intersection with a 15-foot rope, as shown in the figure. Over how many square feet may the cow graze?...
1 answers
Problem 14.20 Constants I Periodic Table Part A A 264 g ball is tied to a...
Problem 14.20 Constants I Periodic Table Part A A 264 g ball is tied to a string. It is pulled to an angle of 4.4° and released to swing as a pendulum. A student with a stopwatch finds that 15 oscillations take 15 s How long is the string? Express your answer to two significant figures and inclu...
1 answers
An engineer has designed a valve that will regulate water pressure on an automobile engine. The...
An engineer has designed a valve that will regulate water pressure on an automobile engine. The valve was tested on 220 engines and the mean pressure was 5.2 lbs/square inch. Assume the standard deviation is known to be 1. If the valve was designed to produce a mean pressure of 5.1 lbs/square inch, ...
1 answers
Gia Fashion operates three departments Men's, Women's, and Accessories. Departmental operating income data for the third...
Gia Fashion operates three departments Men's, Women's, and Accessories. Departmental operating income data for the third quarter of the current year are as follows: (Click the icon to view the data.) Assume that the fixed expenses assigned to each department include only direct foed costs of...
1 answers
SHOW ALL WORK. Preferred if you showed how to do it on both financial calculator and...
SHOW ALL WORK. Preferred if you showed how to do it on both financial calculator and by hand. 1. The nominal rate is 12% per annum. What is the effective annual rate if interest rates are compounded continuously? A. 1% B. 12% C. 12.68% D. 12.75% 2. Which of the following are true? (a) To adjust for ...
1 answers
Primary EPS is changed to fully diluted EPS for outstanding convertible bonds by Adding to the...
Primary EPS is changed to fully diluted EPS for outstanding convertible bonds by Adding to the denominator the shares the bonds can be converted into Adding to the numerator the interest expense on the bonds, net of tax savings from the bonds interest expense Convertible bonds are not considered wh...
1 answers
Erythromycin 48 g in divided doses, is ordered for a patient with syphillis. You are told...
Erythromycin 48 g in divided doses, is ordered for a patient with syphillis. You are told to give the medicine 4 times per day for 12 days. You have only 400 mg tablets. How many tablets will you give the patient each time? ....
1 answers
A soccer ball of mass 0.50 kg is rolling with velocity 0, 0, 1.8 m/s, when...
A soccer ball of mass 0.50 kg is rolling with velocity 0, 0, 1.8 m/s, when you kick it. Your kick delivers an impulse of magnitude 1.2 N · s in the −x direction. The net force on the rolling ball, due to the air and the grass, is 0.22 N in the direction opposite to the direction of the ...
1 answers
Question 5 (2.0 pts) Assume that Cp for an ideal gas is given by co(T) =...
Question 5 (2.0 pts) Assume that Cp for an ideal gas is given by co(T) = 0.9 + 2.5 x 10-* T, in kJ/kg-K, where is the temperature in Kelvin. (Use the gas constant R = 0.3 kJ/kg-K) (a) (+0.4) Derive an expression for Cy as a function of temperature. The gas undergoes an isochoric process from a tempe...
1 answers
QUESTION 10 Racemization of a chiral complex such as [Ru(bpy)312+ is least likely to occur by:...
QUESTION 10 Racemization of a chiral complex such as [Ru(bpy)312+ is least likely to occur by: a. pathway involving a 5-coordinate species where one bidentate bpy ligand becomes monodentate b. a dissociative pathway where the entire bidentate bpy ligand dissociates and then re-coordinates oc the Ray...
1 answers
Project 2 F. Sibling aggression is associated with worse child mental health, but the link is...
Project 2 F. Sibling aggression is associated with worse child mental health, but the link is especially strong for later-born children and is weaker in firstborn children. Broader theory: This may be because younger children are more vulnerable to the negative effects of aggression. (This is a more...
1 answers
3 pts Question 4 Sandra is a client of yours whom completed a 3-day diet record....
3 pts Question 4 Sandra is a client of yours whom completed a 3-day diet record. Based on your analysis, she consumes an average of 75 grams of protein, 250 grams of carbohydrates, and 45 grams of fat per day. How many kcalories total does she consume on average per day? 20 What percent of her diet ...
1 answers
How do i find five ordered pairs for y=2x+5?
How do i find five ordered pairs for y=2x+5?...
1 answers
PROBLEM5 A tensile test specimen of stainless steel alloy having a diameter of 0.495 inches and...
PROBLEM5 A tensile test specimen of stainless steel alloy having a diameter of 0.495 inches and a gage length of 2.00 in was tested to fracture. Stress and strain data obtained during the test are shown below. Determine a. The modulus of elasticity b. The proportional limit c. the ultimate strength ...
1 answers
Un Company sold office equipment with a cost of $39270 and accumulated depreciation of $35,912 for...
Un Company sold office equipment with a cost of $39270 and accumulated depreciation of $35,912 for $5,320. Required a. What is the book value of the asset at the time of sale? b. What is the amount of gain or loss on the disposal? c. How would the sale affect net income (increase, decrease, no effec...
1 answers
Problem 3 ( 60 points). The system in the figure is in equilibrium. A concrete block...
Problem 3 ( 60 points). The system in the figure is in equilibrium. A concrete block of mass 194 kg hangs from the end of the uniform strut of mass 67.9 kg. For angles φ = 24.1° and θ 54.0°, find (a) the tension T in the cable and the (b) horizontal and (c) vertical components of t...
1 answers
4. A firm produces computers with two factors of production: labor L and capital K. It's pro- duction function is ....
4. A firm produces computers with two factors of production: labor L and capital K. It's pro- duction function is . Suppose the factor prices are wl = 10 and wK = 100. (a) Graph the isoquants for y equal to 1.2, and 3. Does this technology show increasing, constant, or decreasing returns to scal...
1 answers
You're working for Ford as a safety engineer. You job is to check the stopping ability...
You're working for Ford as a safety engineer. You job is to check the stopping ability of different types of brakes. To do this, you measure the stopping distance of cars in order to determine their acceleration. If a car moving at an initial velocity of 25.6 m/sec has a stopping distance of 99....
1 answers
Need ALL discussion questions answered plz! venents from a public good without bearing its cost. CASE...
Need ALL discussion questions answered plz! venents from a public good without bearing its cost. CASE 16.2 To Vaccinate or Not When students start school, they have to prove that they were vaccinated against diseases such as chicken pox, polio, and measles, which can spread quickly through an unprot...