subject

Heads or tails - Import all random methods (eg import random)

- Generate a random number between 1-2

- Store the value in a variable called, 'rnd_value'

- If rnd_value equals 1, then output, 'heads' and if rnd_value equals 2, then output, 'tails'

- Use a variable called 'heads' assigned to 0, and a variable called, 'tails' assigned to 0

- Each time heads or tails is output, increment the variables heads to tails by 1

- Use a loop to repeat this process x1000, so that the variables heads/tails is being increment each time by 1

- After the loop is complete, then output the value of the variable heads and output the value of the variable tails.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:50
Free points just awnser this. what should i watch on netflix
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
You know the right answer?
Heads or tails - Import all random methods (eg import random)

- Generate a random number...
Questions
question
Mathematics, 13.10.2019 08:10
Questions on the website: 13722359