Looping Statements
February 26th, 2016
Loop Practice
- Make a method that rolls some input number of dice using a for
loop.
- Make a method that rolls some input number of dice using a
while loop.
- Make a method that simulates the following experiment: See how
many rolls it takes to roll x number of dice of value y.
- Make a method that prints out all odd integers up to some max
value.
- Make a method that tests whether or not an input parameter is
prime.
- Make a method that prints out all prime numbers up to a
maximum value.