Chapter 2 · The story continues down here
You’ve looked beneath the surface. Now try changing something — and see how the nightlight answers.
# how much light shall we give the moon?
lamp = Nightlight("Quiet light")
lamp.warm =
lamp.on()
# Chess knows another way
lamp.()
A name for the nightlight
Saved only in this browser on this device.
Check it together
Make a nightlight that glows softly: brightness from 1 to 30. Run the command and show a grown-up which number you chose.
Right now your nightlight is at 0 %