subject

Write a program that simulates flipping a coin repeatedly and continues until three consecutive heads. are tossed. At that point, your program should display the total number of coin tips that were made the average number of heads. #1 - Write a function to read in the user's information (name & gender) #2 - Write a function to flip the coin and return a bool (heads = true, tails = false) #3 - Write a function to calculate the average of heads vs. total flips #4 - Write a function to output the results Address male users as Mr. and female users as Ms. HINT: Code one function at a time and test it... then add the loop and re-test. Turn in as a single PDF file-Include three (3) test runs. 1-Output (cut and pasted into a txt file in eclipse) 2- Source Code (printed from eclipse - PROPERLY DOCUMENTED) INPUT/OUTPUT - should be formatted as follows - This represents one possible sample run (Class heading should be also displayed) Welcome to coin toss! Get 3 heads in a row to win! What is your name? Ed Peck What is your gender (m/f): M Try to get 3 heads in a row. Good luck Mr. Ed Peck! Press to flip TAIL Press center> to flip HEAD Press to flip HEAD Press center to flip HEAD Press center> to flip HEAD It took you 6 tosses to get 3 heads in a row. On average you flipped heads 67% of the time

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
Acase study allows a more detailed look at the life of a single subject than any other study.
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Quic which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
You know the right answer?
Write a program that simulates flipping a coin repeatedly and continues until three consecutive head...
Questions
Questions on the website: 13722367