Run your first Python program — quick review
A program is a list of instructions that a computer carries out in order.
Lines you want to keep go in the editor window. A line you want to try once goes after >>> in the Shell. Save the file, choose Run and then Run Module, and read the result in the Shell below the newest RESTART line. For print("Lantern") the printed line is Lantern. The quote marks belong to your instruction, and the >>> belongs to the Shell, so neither is part of the printed line.
Open IDLE from your Python 3.13 installation. IDLE is an optional part of Python. If it is missing, look for instructions from whoever provided your Python. Depending on its settings and how you start it, IDLE may open an editor window when it starts. If you do not see the Shell, choose Run, then Python Shell, to open it.
In the Shell, after the
>>>prompt, typeprint("Lantern")and press Return. The Shell shows Lantern.Choose File, then New File, to open an empty editor window.
In the editor window, type
print("Lantern")on line 1. Type the instruction only, without>>>.Choose File, then Save. A new file has no name yet, so IDLE asks you for one with Save As. Type lantern.py. While a window has unsaved changes, its title has a * at each end. The title bar also shows the Python version, so check that it says 3.13.
Choose Run, then Run Module. The IDLE documentation names F5 as the key for it. If you forgot to save, IDLE either asks you to save or saves for you, depending on its settings.
Look at the Shell. You see a line containing RESTART, then Lantern, then the prompt.
In the editor, change Lantern to Cove so the line reads
print("Cove"). Save, then run again. Cove appears below a newer RESTART line. Lantern stays higher up, because the Shell keeps earlier output.
The usual mistake is writing the expected output as >>> Lantern, or as Lantern inside quote marks. The >>> is the Shell's prompt. The Shell shows it after the run to say it is ready for your next line, so it is not part of what your program printed. The quote marks belong to your instruction, and the printed line is Lantern alone. A related slip is copying >>> into the editor window. The file holds only your instruction. If nothing new appears, check two things. Look in the Shell, because the result never appears in the editor. Then look at the window title, because a * at each end means your latest change is not saved yet.