0% found this document useful (0 votes)
4 views2 pages

Python Basics: A Beginner's Guide

Python is a high-level programming language known for its simplicity and versatility, used in various fields such as web development and data science. Key features include an easy syntax, being open-source, and extensive library support. The document covers fundamental concepts like variables, data types, operators, control structures, and data structures, emphasizing the importance of practice for proficiency.

Uploaded by

anushahk656
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)
4 views2 pages

Python Basics: A Beginner's Guide

Python is a high-level programming language known for its simplicity and versatility, used in various fields such as web development and data science. Key features include an easy syntax, being open-source, and extensive library support. The document covers fundamental concepts like variables, data types, operators, control structures, and data structures, emphasizing the importance of practice for proficiency.

Uploaded by

anushahk656
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 BASICS NOTES

1. What is Python?
Python is a high-level, easy-to-learn programming language used for web development, data
analysis, AI, automation, and more.

2. Features of Python
- Simple syntax (easy English-like statements)
- Interpreted language
- Free and open-source
- Cross-platform
- Large library support

3. Applications of Python
- Web development
- Data science
- Machine learning
- Automation scripting
- Game development

4. Variables
Variables store values.
Example:
x = 10
name = "Anusha"

5. Data Types
- int (10, 25)
- float (10.5)
- string ("Hello")
- bool (True / False)

6. Operators
- Arithmetic: + - * / %
- Relational: > < == !=
- Logical: and or not

7. Input and Output


name = input("Enter your name:")
print(name)

8. If Condition
if x > 10:
print("Greater")
else:
print("Smaller")

9. Loops
For loop:
for i in range(5):
print(i)

While loop:
i=1
while i <= 5:
print(i)
i += 1

10. Functions
def add(a, b):
return a + b

11. Lists
numbers = [1,2,3,4]
print(numbers[0])

12. Tuples
values = (10,20,30)

13. Dictionaries
student = {"name":"Anusha", "age":20}

14. File Handling


f = open("[Link]","w")
[Link]("Hello")
[Link]()

15. Conclusion
Python is powerful, beginner-friendly, and useful for many careers.
Practice daily to become confident in Python.

You might also like