You've been on a archaeological dig in the remote and ancient village of Caffienato, and you've found a pair of stone tablets with a manuscript carved into them. In discussions with Dr. Jones, the head of the site, you realize that the manuscript on these tablets bears a striking resemblance to a manuscript on a pair of tablets discovered last year in the nearby Slitherlund site.
Because you're the one who first noticed the similarity, Dr. Jones has asked you to lead the translation team.
Here are the original tablets found in nearby Slitherlund:
Read both set of tablets (programs). As you read, pay close attention so as to notice similarities and differences between them.
Dr. Jones has been trying to read the new tablets with great interest, but seems a bit lost. He's sent the following panicked email:
I'm having a heck of a time understanding these new tablets. They seem to be describing how to play some sort of game with something called 'Dice', which the tablets we found last year also mentioned. I'm convinced by your argument yesterday that these are describing the same game, but they look so very different. I know you've been reading the tablets carefully, so maybe you can help me.
But first, just to make it easier to discuss, let's give names to the two languages. Let's use the name "Java" to refer to the language used in Caffienato and "Python" to refer to the language of Slitherlund.
Based on your reading and translation work, can you please answer the following questions:
Once again, thanks for your hard work on this important project. I look forward to your informed answers.
Sincerely and with great gratitude,
Answer Dr. Jones's questions in an email. You might want to draft your answers carefully in a text editor before sending them. You can email your answers to me at email@example.com and I'll forward them to Dr. Jones.
Ask for help if you're having problems!