Arduino Uno - Leonardo Incompatibility?

You are missing the call to Serial.begin() in setup:

I recommend this:

Serial.begin(9600);

the reason is that the students must have the baud rate in Serial Monitor set to match the baud rate specified in this line and 9600 is the default baud rate of Serial Monitor.

You will need to keep an eye on that in case they have changed the setting. Due to being a native HID USB device, the baud rate setting doesn't matter on the Leonardo, but the Uno's ATmega328P microcontroller doesn't have this native USB capability so the setting in Serial Monitor or any other serial communication software used on the computer must match the baud rate set in the Serial.begin() call in the sketch that is running on the Uno.