0% found this document useful (0 votes)
5 views1 page

04 Python Basics

Python is a high-level, interpreted programming language known for its readability and simplicity, created by Guido van Rossum in 1991. It supports various data types, control flow, loops, and functions, making it versatile for tasks in web development, data science, and automation. Learning Python is beneficial due to its beginner-friendly syntax, extensive libraries, strong community support, and high demand in the job market.

Uploaded by

Sankha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

04 Python Basics

Python is a high-level, interpreted programming language known for its readability and simplicity, created by Guido van Rossum in 1991. It supports various data types, control flow, loops, and functions, making it versatile for tasks in web development, data science, and automation. Learning Python is beneficial due to its beginner-friendly syntax, extensive libraries, strong community support, and high demand in the job market.

Uploaded by

Sankha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python Programming Basics

What is Python?
Python is a high-level, interpreted, general-purpose programming language. Created by
Guido van Rossum and first released in 1991, Python emphasises code readability and
simplicity, making it one of the most popular languages for beginners and professionals alike.

Variables and Data Types


name = "Alice" # String age = 30 # Integer height = 5.7 # Float
is_student = True # Boolean

Control Flow
if age >= 18: print("Adult") elif age >= 13: print("Teenager") else:
print("Child")

Loops
# For loop for i in range(5): print(i) # While loop count = 0 while count
< 5: count += 1

Functions
def greet(name): return f"Hello, {name}!" print(greet("World")) # Hello,
World!

Why Learn Python?


• Beginner-friendly syntax that reads like English.

• Huge standard library and third-party packages (pip).

• Used in web dev, data science, AI, automation, and more.

• Large, supportive community and abundant learning resources.

• High demand in the job market across all industries.

You might also like