How do I construct a flow chart for how a number can be generated randomly on Python ?

Home » Programming & Design » How do I construct a flow chart for how a number can be generated randomly on Python ?
Programming & Design No Comments

I am currently doing gcse computing and part of my practice course work is to create a game which requires a randomly generated number . If any one could tell me th steps for the flow chart of giv me an example of one for the randomly generated number I would be greatfull. Bear in mind I will be using Python to

I am currently doing gcse computing and part of my practice course work is to create a game which requires a randomly generated number . If any one could tell me th steps for the flow chart of giv me an example of one for the randomly generated number I would be greatfull. Bear in mind I will be using Python to programme so the flowchart must correspond to this

Other answer:

lauren:
You need to understand that a flow chart is totally independent of the language you are programming in. That's why flow charts are universal. You should be able to use the same flow chart to write code for Visual Basic, C, C-Sharp, JavaScript, or any other language.

That having been said, since most languages have a random number generator, the flowchart would be like this:

Generate Random Number

That's it.

Chris P:
You don't seem to understand what flowcharts are. They aren't targeted for a specific language – that's the entire point.

Python has a built in random number generator. The flowchart will have precisely one step:
Generate random number.

Paper Dragon:
Python Random number support: https://docs.python.org/2/library/random…

The hard part is usually generating a seed for the random number generator. But it looks like if you leave the seed blank Python will just use the system time. So the flowchart is something like:

Initialize random number generator, with seed value

Repeat get random numbers, as required.

LEAVE A COMMENT