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

Python Crash Course

Python is a versatile, beginner-friendly programming language used in various fields like web development and data science. The document covers essential topics including basics, control flow, functions, data structures, file handling, object-oriented programming, and popular libraries. It also offers tips for effective learning and practice.

Uploaded by

KVSS kushal
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)
3 views2 pages

Python Crash Course

Python is a versatile, beginner-friendly programming language used in various fields like web development and data science. The document covers essential topics including basics, control flow, functions, data structures, file handling, object-oriented programming, and popular libraries. It also offers tips for effective learning and practice.

Uploaded by

KVSS kushal
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
You are on page 1/ 2

Python Crash Course

1. Introduction
• Python is an interpreted, high-level, general-purpose programming language.
• It is beginner-friendly and widely used in web development, data science, automation, and
more.

2. Basics
• Print: print('Hello, World!')
• Variables: x = 10, name = 'Alice'
• Data types: int, float, str, bool, list, tuple, dict, set

3. Control Flow
• If-Else: if x > 5: print('Big') else: print('Small')
• Loops: for i in range(5): print(i)
• While loop: while x > 0: x -= 1

4. Functions
• def greet(name): return f'Hello {name}'
• print(greet('Alice'))

5. Data Structures
• List: nums = [1, 2, 3]
• Tuple: coords = (10, 20)
• Set: unique = {1, 2, 3}
• Dict: person = {'name': 'Alice', 'age': 25}

6. File Handling
• with open('file.txt', 'r') as f: data = f.read()
• with open('file.txt', 'w') as f: f.write('Hello!')

7. Object-Oriented Programming
• class Person:
• def __init__(self, name):
• self.name = name
• def greet(self):
• return f'Hello, I am {self.name}'

8. Popular Libraries
• NumPy – Numerical computing
• Pandas – Data analysis
• Matplotlib – Visualization
• Requests – Web requests

9. Final Tips
• Practice coding daily
• Solve small projects
• Read documentation & join communities

You might also like