Lab 10: Yahtzee, part II (Updated)
Objectives:
Complete the Yahtzee game
Introduction to Programming Course Blog
Archive for the ‘Labs’ Category.
Complete the Yahtzee game
Understand how to write methods that accept parameters and return values
collect, select, reject, and inject iteratorsUse iterators and blocks as an alternative to loops
As announced during lecture today:
Students that wish to turn in exercise 2 early may do so, but the point worth of the exercise will not change.
rand methodUnderstand the semantics and possible application of the % (modulus) operator
Continue reading ‘Lab 8: Branches and Loops, Part II (Updated)’ »
if statements to implements branchesLearn to use while statements to implement loops
irb to quickly test Ruby codegets to obtain user input