Programmer-defined functions, flip a coin

This assignment tests your ability to create your own functions.

Begin by studying our note on achieving program modularity by defining your own functions.

Write a string function that has no arguments, and returns the string "Heads" or "Tails" with equal probability. Use your function to write a coin program. When it is working, print a screen shot showing it running and a listing of all your code.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.