PYTHON LESSON

Topic 1/63 · Phase 1: Foundations

Print and Comments — Python lesson on EduBard (phase: Foundations)

Print and Comments

Main idea

Python executes line by line and print shows the current state.

Tip

Use comments for intent, not obvious lines.

Watch out

Commenting every line creates noise.

Read this next

You will study Print and Comments. It belongs to the Foundations phase.

Remember this:
Python executes line by line and print shows the current state.

Practice step by step. Do not rush. Each run should show you something new.

Tip:
Use comments for intent, not obvious lines.

Avoid this:
Commenting every line creates noise.

Your challenge:
Print a 3-line introduction with name, goal, and learning reason.

Go to the challenge lab below. Fix errors until the output looks right. Then press the green button to complete the topic.

Example code

Copy this example if it helps. Change it so it matches Print and Comments.

# Topic: Print and Comments
def main():
    sample = "edit me"
    # TODO: apply Print and Comments concept here
    result = sample
    print("Result:", result)

if __name__ == "__main__":
    main()

Challenge

Print a 3-line introduction with name, goal, and learning reason.

Before you can finish: your output should include at least 18 characters; at least 3 non-empty line(s); no crash traceback—fix errors until the program runs cleanly.

Use Run. Read the output. Change your code until the task is done.

Starter reference

# Challenge starter for Print and Comments
def solve():
    # Write your solution here
    pass

print("Update solve() and run")

Your code

The first Run may load Python in your browser (one-time). Later runs are faster.



    
    

Navigation