Hello, Python!
Loading simulation…
flagWhat you'll discover
- arrow_forwardRun Python code and read its output
- arrow_forwardPrint text and numbers with print()
- arrow_forwardStore text and numbers in variables
- arrow_forwardBuild sentences with f-strings and {curly} slots
Python reads like English
Python was designed to be the most readable programming language ever, and it shows: print("Namaste") does exactly what it says. There are no semicolons to forget and no curly braces to balance — Python uses plain indentation to organise code. That friendliness is why Python is the most taught first language in the world, yet the same language drives YouTube's backend, Instagram's servers and most of modern artificial intelligence research. Easy to start, almost impossible to outgrow.
Variables without ceremony
Creating a variable in Python is one line: name = "Mina" or age = 16. No special keyword needed — the equals sign means "store the right side under the left side's name". Text values, called strings, must sit inside quotes; numbers stand bare. The difference matters: "16" in quotes is text, while 16 is a number you can do maths with. If Python complains it cannot add text and numbers, wrap the number in str() to convert it first.
f-strings: fill-in-the-blank sentences
The slickest way to mix variables into text is the f-string: put an f before the opening quote, then write {variable} wherever a value should appear. print(f"My name is {name} and I am {age}") fills both slots automatically. The braces can even hold maths: f"{6 * 7}" becomes 42. Compared with gluing strings together using plus signs, f-strings are shorter, cleaner and much harder to get wrong — modern Python code uses them everywhere.