Class 9 - AI Python Notes
What is Python?
Python is a high-level, interpreted programming language created by Guido van Rossum in 1991. It is s
Features of Python
1. Simple & Easy to Learn – Syntax close to English.
2. Interpreted Language – Runs directly without compilation.
3. Free & Open Source – Anyone can use.
4. Portable – Works on Windows, Mac, Linux, etc.
5. Object-Oriented – Supports classes and objects.
6. Extensible – Can use other languages inside Python.
7. Rich Library – Has modules for math, graphics, AI, etc.
Uses of Python
- Web Development (Django, Flask)
- Data Science & AI (Machine Learning, Deep Learning)
- Game Development (Pygame)
- Automation / Scripting
- Mobile & Desktop Applications
Example Code
print("Hello, World!")
a = 10
b = 20
sum = a + b
print("The sum is:", sum)
Output:
Hello, World!
The sum is: 30
Quick Questions
Q1. Who invented Python?
Ans: Guido van Rossum in 1991.
Q2. Is Python compiled or interpreted?
Ans: Interpreted.
Q3. Write a simple Python program to print 'Welcome AI'.
Ans:
print('Welcome AI')