Punto Banco main program - 6
We now need to write our main program using the algorithm we wrote. We will put our main program in a function called main. When we want to run the program, we will just call this function. I have also added a little extra code at the end, to check who won.
Q1. Modify your existing code so it looks like the code below.
Q2. What tests need to be done to prove this program works in all eventualities? How could you check this program thoroughly? For example, how can you check that all the permutations of whether the bank should get a third card actually works properly, that when the bank has a 3 and the player has an 8, the bank doesn't get a card? Can you think of any way of doing this without having to run hundreds of tests until you find the data being entered by the program that you want or so that you don't have to change the code too much?