Lesson 1.1 · Write it
Floor sign
A whole programPython or Java1 test
A lift shows a sign when its doors open. Write a program that prints exactly this sign, on one line:
Floor 3: Library
- The words start with capital letters, as shown, and everything else is lower case.
- The colon comes straight after the 3, with no space before it, and one space after it.
- Print nothing else. Spaces at the end of the line are ignored.
The program reads no input. In Python, the whole program can be one line. In Java, the page starts you with a class and its main method: write your line between the braces of main, and print with System.out.println.
Running Java here comes later. You can still write your Java answer (it stays while this page is open) and compare it with our worked solution. Or try this exercise in Python.
Examples
Your program is run once, as in the example below. Only what it prints is checked.
the sign, exactly (rules 1 to 3)
You type
Nothing
It prints
Floor 3: Library
solution.pySolution.java