Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1 of 3: Finding a Factorial Create a flowchart, test cases, and write a program that calculates the factorial of a given integer. Your

image text in transcribed

Task 1 of 3: Finding a Factorial Create a flowchart, test cases, and write a program that calculates the factorial of a given integer. Your vi should have one input for the integer, and one output for that integer's factorial. (Hint: use the blue index ([i]) block that is a part of your For Loop structure - but remember, the first index value in LabVIEW is zero. You may need to add/alter some blocks to make sure you don't get permanently stuck with a value of zero in your shift register.) n!=12n Task 2 of 3: Generating and Working with Random Numbers Create a flowchart, test cases, and write a program that will calculate the average of a set of random numbers with values between 0 and 10 . The size of that set of random numbers should be specified by the user as an input. One random number should be generated during each loop, and the average of all the random numbers generated should be the only output from your vi. For this task, you will need to use the block called Random Number (0-1). It can be found in the Numeric function folder, or by typing its name in the search/quick-drop bar. The Random Number ( 01) block generates a random number with a value between 0 and 1 . You will need to scale its output for this task. Make sure this is reflected in your flowchart. (Hint: what would you expect the average of a large number of random values between 0 and 10 to be? How does that inform your test cases?) Task 3 of 3: Combining Conditionals and Loops For this task you will create a new version of the files that you made for Task 2. Make sure to save them as new files under new names before you begin editing. In addition to finding the average of the random numbers being generated, make it so that your vi also counts how many of those random numbers are greater than a user-specified limit in a range from 0 to 10 . Have your vi output the result of that count to the user. (Hint: you can give feedback on the user's specified limit by using conditionals within your block diagram to display messages, or by directly altering the Data Entry properties of your new numeric control. You can access the Data Entry and Properties menus of your numeric control by right-clicking on it.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

reference your work in a credible way.

Answered: 1 week ago

Question

Compute the derivative f(x)=(x-a)(x-b)

Answered: 1 week ago

Question

4. What advice would you give to Carol Sullivan-Diaz?

Answered: 1 week ago