Your first lines of code
print("Hello, world!")print() is a function — it takes whatever you put inside the parentheses and displays it. The text inside the quotes is called a string. You can use either single quotes '...' or double quotes "..." — Python doesn't care.print('Same thing, different quotes')#. Python ignores everything after it on that line. Use comments to leave notes for yourself (or future you).# This is a comment — Python skips this
print("But this runs!")print("Hello", "from", "Python")Modify the code to print three things: 1. A greeting 2. Your name 3. Your favorite number (use a comma to mix text and numbers)
loading editor...
Ask about Hello, Python
◇
Hey! I'm your AI tutor.
Ask me anything about this lesson, or paste code you're stuck on.
AI tutor is a premium feature