Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

The if Statement [3/16]

This program rolls the dice 19 times and notifies you if it gets a 6.
[Run the program]

The print statement is the same as println, except that it doesn't necessarily advance to the next line.

Exercise:

Modify the program such that it outputs a notification when the dice rolls a number smaller than 3.

Loading...