CS320n - Assignment 8
Placed online: Wednesday, April 15
Due: no later than 8 pm, Friday, April 24
Value: 30 points. about 4% of final grade
Purpose: To create a LabVIEW program
You can complete this assignment with one other person. Include a label on the front panel and block diagram indicating who worked on the program.
Create a LabVIEW program that implements a guessing game.
the user of the program enters an upper limit
the program then generates a random number between 1 and the upper limit. It should be possible for the upper limit to be picked as a number.
the user then enters a guess for the number
if the user picked the right number a green light should be turned on
if the user was within 10 of the right number a blue light should be turned on
if the user was with 100 of the right number a purple light should be turned on
if the user was more than 100 from the right number a red light should be turned on
it is possible for multiple lights to be on. If the user guesses the right number the green, blue, and purple light should all be on. This is easier than trying to only make one light go on.
The program should continue to run until the user gets the number correct.
It is not necessary, but if you want to try for something extra, have only one light turn on, the appropriate one for the guess.
Another extra would be to allow the user to enter the upper and lower limits for the guess.
Another extra would be for the human to pick the number and have the computer guess, but that would be a very different program.
Your front panel should look something like this (with you name instead of mine.):
Tips.
The user must enter their guess before the program is running. You do not have to include the capability to allow the user to enter the guess while the program is running. To change the on color of a button, right click on it, select properties, and pick the on color. The off color should remain black
You will have to do comparison. The comparison operators are on
the Comparison Palette.
realize that order of inputs matters on the comparison operators.
You can use the Express operations (formulas, comparisons) if you want.
Refer to the class slides from LabView Foundations (starting on slide number 36), for how to generate a random number in a given range.
Turn in your LabVIEW program using the Turnin program.. The name of your world shall be your UTEID followed by a dash and a8. For example, my UTEID is scottmd3 so my world would be named scottmd3-a8.vi. Turn the file in via the turnin program no later than 8pm, April 24.