CodeField

Make a choice

Task 5 of 6

Write

Read a year. Print leap if it is a leap year, and not leap if it is not. A year that divides by 4 is a leap year, except a year that divides by 100, which is a leap year only if it also divides by 400.

  • Example: 2024 gives leap
  • Example: 2023 gives not leap

Your program, Python

Tab indents. To leave, press Escape, then Tab.

Compare it with a model answer now, or come back on a device that can run Python.

Python for this device

Writing tasks run your program on this device. That needs Python: 5.5 MB, once. About 2 minutes on 3G, about 8 on a slow connection. It stays on this device. Remove it in Settings at any time.

You can do the other tasks while it downloads.