CSERD


  • userhome
  • catalog
  • resources
  • help

Programming in Java


Shodor > CSERD > Resources > Tutorials > Programming in Java

  Intro  •   Lesson 1  •   Lesson 2  •   Lesson 3  •   Lesson 4  •   Lesson 5  •   Final Challenge


Programming in Java - Final Challenge

This is it, time to test what you have learned and see if you can put it all together.

The Gambler part 2: Does the House Always Win?

A friend tells you about his/her idea to always win while gambling. The strategy goes as follows. Each time you lose, bet twice as much as you have lost since the last time you won. Assuming the better starts with a finite amount of money, and the house has a maximum bet, is this a sound strategy? Write a program to test your friend's theory, and come up with a response to your friend.


©1994-2024 Shodor