Anatomy of a Print Statement
Let's break down that first piece of code. Click on each highlighted part below to identify it.
Identify all 5 parts!
Build-a-Print Statement
Drag the pieces (or tap-and-drag on touch devices) from the top box into the dark grey area below to construct a valid `print()` statement that displays the text "Python rocks!".
Your Turn to Code (Simulated)
Now, type your own `print()` command in the editor below. Try to make it print your name! Then click "Run Simulation".
Spot the Comment
Remember, comments start with `#`. Click on the line(s) below that are comments. Click again to deselect. Then click "Check Selection". Use the icons for feedback!
Mini Missions!
Let's put it all together. Complete the following small coding tasks using the simulator. You can try again if you get it wrong!
Mission 1: Favorite AI Topic
Write a Python command to print your favorite AI topic (e.g., "Computer Vision", "NLP", "Robotics").
Mission 2: Two Lines
Write two separate `print()` commands. The first should print "Learning Python...", and the second should print "...is step one!".
Mission 3: Code with a Comment
Write a `print()` command to display "AI for Good". On the next line, add a comment explaining what the code does (e.g., `# Prints a positive message`).
Module 0 Practice Complete!
Fantastic job working through these exercises! You've solidified the basics.
Next up: tackle the Advanced Practice for Module 0 to truly master these concepts!