Python is a simple, powerful programming language. It’s great for beginners because its syntax reads like English. You can use it for web development, data science, automation, artificial intelligence, and more. It is one of the most popular languages in the world today.
The most basic program prints text to the screen. In Python, it looks like this:
print("Hello, World!")
When you run this code, it will show exactly: Hello, World!
Variables store data you want to use later. You don’t need to specify the type — Python figures it out automatically:
name = "Stewaard" age = 20 print(name) print(age)
Common types of data in Python include:
• Strings: Text, e.g. "Hello World"
• Integers: Whole numbers, e.g. 5, 100, -30
• Floats (Decimals): Numbers with points, e.g. 3.14, 99.9
• Booleans: True or False values
Make decisions in your code. Do one thing if true, another if false:
score = 80
if score > 50:
print("You passed!")
else:
print("Try again.")