Python Programming
Soumik Jana
August 1, 2024
,2
, Contents
1 Python Basic Programs 5
1.1 Working with numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 Calculating the Factors of a positive integer . . . . . . . . . . . . . . . . . . 5
1.1.2 Calculate the factorial of a positive integer number . . . . . . . . . . . . . . 6
1.1.3 Finding the roots of a quadratic equation . . . . . . . . . . . . . . . . . . . 6
1.1.4 Generating a Multiplication Table . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.5 Converting unit of measurement . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Algebra and Symbolic Math with sympy . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.1 pip install sympy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Ploting using sympy in python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3
Soumik Jana
August 1, 2024
,2
, Contents
1 Python Basic Programs 5
1.1 Working with numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 Calculating the Factors of a positive integer . . . . . . . . . . . . . . . . . . 5
1.1.2 Calculate the factorial of a positive integer number . . . . . . . . . . . . . . 6
1.1.3 Finding the roots of a quadratic equation . . . . . . . . . . . . . . . . . . . 6
1.1.4 Generating a Multiplication Table . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.5 Converting unit of measurement . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Algebra and Symbolic Math with sympy . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.1 pip install sympy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Ploting using sympy in python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3