Answered step by step
Verified Expert Solution
Question
1 Approved Answer
help solve 3.1 and 3.2 Problem 3.1 Consider the following matrices (some are row vectors, some are column vectors): r=[1320],s=2015,u=xyz Calculate the following matrix products
help solve 3.1 and 3.2
Problem 3.1 Consider the following matrices (some are row vectors, some are column vectors): r=[1320],s=2015,u=xyz Calculate the following matrix products by hand. Show your work. a) rs b) sr c) ur Problem 3.2 For each of the following problems, indicate whether a solution to the problem would most naturally tend to include an IF statement (including IF/ELSE, IF/ELSEIF, etc.), a FOR loop, or a WHILE loop, and explain your reasoning. You may include more than one of the above structures, or none of the above, but explain your reasoning. a) Accept 50 position measurements xi and calculate the corresponding spring force Fi=kxi+c for each one. b) Simulate rolling a 6 -sided die 100 times. c) Ask the user to enter a number. Calculate the square root of that number. Print the square root to the screen. d) Ask the user to enter a number between 0 and 100. If they enter a number outside this range, display an error message and ask again. Repeat until they enter a number in this range, then perform some calculations with that number and display the result. e) Population growth can often be modelled using the logistic formula Pyear+1Pyear[1+r(1KPyear)] Estimate the number of years it will take a given population to reach 800 million by starting with the current population, repeatedly applying the formula, and stopping when Pyear8108. f) Calculate and display the square root of x if x is not a negative number. Display an error message if it is negative Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started