Have a Question ?

Home / Answered Questions / Other / for-games-to-hold-your-interest-they-almost-always-include-some-random-unpredictable-behavior-for-ex-aw515

(Solved): For Games To Hold Your Interest, They Almost Always Include Some Random, Unpredictable Behavior. For...

For games to hold your interest, they almost always include some random, unpredictable behavior. For example, a game in which you shoot asteroids loses some of its fun if the asteroids follow the same, predictable path each time you play. Therefore, generating random values is a key component in creating most interesting computer games. Many programming languages come with a built-in module you can use to generate random numbers. The syntax varies in each language, but it is usually something like the following:

my RandomNumber = random(10)

In this statement, myRandomNumber is a numeric variable you have declared and the expression random(10) means “call a method that generates and returns a random number between 1 and 10.” By convention, in a flowchart, you would place a statement like this in a processing symbol with two vertical stripes at the edges, as shown below.

Create a Flowgorithm program that shows the logic for a program that generates a random number, then asks the user to enter of a number between 1 and 10. The program will then display the randomly generated number so the user can see whether their guess was accurate. (In future chapters, you will improve this game so that the user can enter a guess and the program can determine whether the user was correct.)

The Flowgorithm programming language has the ability to make random numbers. You may need to research on their website how to create a random number.

Create a word document for the submission document and put screen shots in of the program working. Show at least 2 runs of the program.   The best way to submit is to zip into a single zip file, both the word document and your Flowgorithm program file and submit that single zip file to the dropbox.

how does this  works in a flowgorithm? because it wont run

my RandomNumber = random(10)

We have an Answer from Expert View Expert Answer

Expert Answer

We have an Answer from Expert
Buy This Answer $6

-- OR --

Subscribe To View Unlimited Answers
Subscribe $20 / Month