Python Land
search Search Sign in Sign up
0%
search

Welcome to Python Land · practice

Meet the Python Playground

You have already run a few small examples inside the course. Now it’s time to meet the larger Python playground used for practice lessons.

This playground is where you’ll write, run, and improve your own programs. There is nothing to install. Python runs directly in your browser.

If the playground takes a moment to appear the first time, that’s normal. Python is getting ready for you.

Three things to notice

Depending on the size of your screen, the playground may appear beside this lesson or in a separate tab.

The editor

The editor is where you write Python code. It already contains two instructions for this lesson, so you don’t have to begin with an empty screen.

You can click anywhere in the editor and type just as you would in an ordinary text editor.

The output

When Python runs your code, its response appears in the output area. For this program, the output will be two lines of text.

Remember the distinction from the previous lesson:

  • The editor contains code.

  • The output area shows the result of running that code.

Run, the debugger, Reset, and Submit

The playground has three everyday controls and one debugger:

  • Run carries out all the code and shows you what happens.

  • The debugger replays the program one instruction at a time.

  • Reset restores the original starter code.

  • Submit checks whether your code completes the exercise.

Run is for seeing the complete result. The debugger is for slowing the program down so you can see how it reaches that result. Submit is for checking your finished work.

A submission that doesn’t pass is not the end of the exercise. Read the feedback, change your code, and try again.

What the controls reveal

Running the unchanged starter shows:

Hello from the playground!
This line is ready to change.

The debugger can then replay those two instructions. Next moves forward, Prev moves backward, and the highlighted line shows which instruction produced each piece of output. The Locals panel may be empty in this tiny program because it does not create any variables yet. In the next chapter, the same panel will show variables appearing and changing.

Reset restores the starter after an experiment, so you can change something, observe the result, and still get back to known code. A small safety net, but a comforting one.

Complete the exercise

Your actual task is to change the second instruction so the program produces this exact output:

Hello from the playground!
I changed the code.

You only need to replace the text between the quotation marks on the second line. Keep print(, the quotation marks, and the closing ) in place.

Press Run and compare the output carefully. When both lines match, press Submit.

Capital letters and punctuation matter in this exercise. That isn’t meant to trick you. Computers follow instructions very literally, and noticing small differences is a useful programming habit.

Monty can guide you

If you’re unsure where to click or what to change, ask Monty:

I’m completely new to code editors. Guide me through this exercise one step at a time, but let me type the answer myself.

You can also ask Monty to compare your output with the target. If something doesn’t match, Monty can help you spot the difference without taking over.

If you have Monty helps left today, this is a good moment to try a follow-up question.

Once your submission passes, you will have completed the full programming cycle for the first time: read, edit, run, inspect, and check.

Task

Change the second printed message so the program produces exactly:

Hello from the playground!
I changed the code.

Press Run to inspect the output, then press Submit when both lines match.

Before submitting, press Step once to open the debugger. Use Next to replay the two instructions, then use Prev or the slider to move backward. Notice that each output line appears only after its matching print() runs.

Community

Questions learners asked

Monty answers that learners found helpful and chose to share, rewritten without private conversation details.

Original language: Unknown or mixed language

Why does the editor button use a </> icon?

The </> icon is a common symbol for code. The angle brackets look like the start and end of an HTML tag, so many programming tools use it to mean “code editor” or “view the code.” It is just a visual label, not something you need to type. In this playground, clicking that button opens or focuses the editor where you write your Python code.

Asked by 1 learner Sign in to vote

Original language: English

What does the prompt "I'm completely new to code editors. Guide me through this exercise one step at a time, but let me type the answer myself" mean in this lesson?

That sentence is not code to type. It is an example of a question you can ask Monty, the chat assistant, when you need help. It means: "I have never used a code editor before, so please walk me through each step slowly. But don't just give me the finished answer—I want to type it myself so I learn." In this exercise, Monty might guide you by saying: find the second print(...) line in the editor, click inside the quotation marks, delete the old text, and type the new message while keeping the quotation marks and parentheses. You would make the actual edit, and Monty would help you compare your output with the target. This way you practice the full cycle: read, edit, run, inspect, and check.

Asked by 1 learner Sign in to vote

Private

Your lesson notes

Your own space for notes, examples, and reminders tied to this lesson. Only you can see them, and they stay here when you come back.

Sign in to keep notes on this lesson.

←PreviousWhat Is Programming?NextYour First Python Instructions→

Your code and progress are temporary while you are signed out.

We’ll keep this solution in this tab for 30 minutes while you sign in or create an account.

Loading the code panel…

Monty

Sign in to ask Monty for help.

Sign in
Python Land
⚠

Python Land is temporarily unavailable

We can’t reach the learning platform right now. Your account and progress are safe. Please try again in a moment.