PYTHON LESSON
Python executes line by line and print shows the current state.
Use comments for intent, not obvious lines.
Commenting every line creates noise.
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.
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()
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.
# Challenge starter for Print and Comments
def solve():
# Write your solution here
pass
print("Update solve() and run")
The first Run may load Python in your browser (one-time). Later runs are faster.