Computers and Technology

Write program that uses a function named cointoss that simulates the tossing of a coin. when you call the function, it should generate a random number in the range of 1 through 2. if the random number is 1, the function should display “heads”. if the random number is 2, the function should display “tails”. demonstrate the function in a program that asks the user how many times the coin should be tossed, then simulates the tossing of the coin that number of times.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 04:00, coolconnor1234p0sv4p
Another name for addicting games. com
Answers: 1
image
Computers and Technology, 23.06.2019 14:00, LuvIsRage2
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
image
Computers and Technology, 23.06.2019 22:30, ghari112345
Jamie has to enter the names, employee id’s, and income of a group of employees into a worksheet. which option will jamie use to describe the data
Answers: 3
image
Computers and Technology, 24.06.2019 06:30, toolazytobehuman
Me and category do i put them in because this is science
Answers: 1
Do you know the correct answer?
Write program that uses a function named cointoss that simulates the tossing of a coin. when you cal...

Questions in other subjects:

Konu
Mathematics, 24.11.2020 02:00