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

Python Basics for Data Science

Chapter 2 provides an introduction to Python, highlighting its popularity in Data Science due to its simple syntax, readability, and extensive library support. It covers basic concepts such as numbers and arithmetic operations, including integers and floats, along with examples of various arithmetic calculations. The chapter serves as a foundational review of Python before delving into Data Science applications.

Uploaded by

shariqsajeel786
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 views1 page

Python Basics for Data Science

Chapter 2 provides an introduction to Python, highlighting its popularity in Data Science due to its simple syntax, readability, and extensive library support. It covers basic concepts such as numbers and arithmetic operations, including integers and floats, along with examples of various arithmetic calculations. The chapter serves as a foundational review of Python before delving into Data Science applications.

Uploaded by

shariqsajeel786
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

Chapter 2: A Crash Course in Python

Introduction
Python is the most popular language for Data Science.
It is popular because: simple syntax, readability, and huge library support.
This chapter revises Python basics before Data Science.

1. Python Basics

1.1 Numbers & Arithmetic


Python works with integers (whole numbers) and floats (decimal numbers).
Examples:
5 + 3 # 8
10 - 4 # 6
2 * 3 # 6
7 / 2 # 3.5 (normal division)
7 // 2 # 3 (integer division)
7 % 2 # 1 (remainder)
2 ** 3 # 8 (power)

You might also like