Buy Now and Pay in EMI's

Basic and Advance Python Programming

Agya Ram Verma, Yatendra Kumar, Sag Ram Verma
  • Country of Origin:

  • Imprint:

    NIPA

  • eISBN:

    9789394490499

  • Binding:

    EBook

  • Language:

    English

Individual Price: 220.55 USD 198.50 USD

Add to cart Contact for Institutional Price
 

This book will introduce you to the python programming language. It's aimed at beginning programmers, but even if you have written programs before and just want to add python to your list of languages.

The first eight chapters explain python's basic and you should read them in order. The later chapters show how Python is used in specific application areas such as the web, database, networks, and so on, read them in any order you like. Chapter 1 this chapter explain different basic topic related python programming. Chapter 2 in this chapter define python operator. Chapter 3 in this chapter define looping statement. Chapter 4 in this chapter define python function. Chapter 5 in this chapter explain string statement. Chapter 6 in this chapter define list in python programming. Chapter 7 in this chapter explain tuple in python programming. Chapter 8 in this chapter explain dictionary in python programming. Chapter 9 in this chapter explain numpy in python programming. This chapter explains lambda function in python programming. Chapter 11 in this chapter explain pandas in python programming. Chapter 12 in this chapter explain python pandas functionality. Chapter 12 in this chapter explain data frame basic functionality. Chapter 13 in this chapter explain python pandasstatical functions. Chapter 14 in this chapter explain python panda visualization. Chapter 15 in this chapter explain data visualization in python programming. Chapter 16 in this chapter explain object oriented programming. Chapter 17 in this chapter explain module in python programming. Chapter 18 in this chapter explain python library.  Chapter 19 in this chapter explain turtle graphics in python programming. Chapter 20 in this chapter explain brief tour of the standard library.

0 Start Pages

Preface This book will introduce you to the python programming language. It’s aimed at beginning programmers, but even if you have written programs before and just want to add python to your list of languages. The first eight chapters explain python’s basic and you should read them in order. The later chapters show how Python is used in specific application areas such as the web, database, networks, and so on, read them in any order you like. Chapter 1 this chapter explain different basic topic related python programming. Chapter 2 in this chapter define python operator. Chapter 3 in this chapter define looping statement. Chapter 4 in this chapter define python function. Chapter 5 in this chapter explain string statement. Chapter 6 in this chapter define list in python programming. Chapter 7 in this chapter explain tuple in python programming. Chapter 8 in this chapter explain dictionary in python programming. Chapter 9 in this chapter explain numpy in python programming. Chapter 10 in this chapter exaplain lambda function in python programming. Chapter 11 in this chapter explain pandas in python programming. Chapter 12 in this chapter explain python pandas functionality. Chapter 12 in this chapter explain data frame basic functionality. Chapter 13 in this chapter explain python pandas statical functions.

 
1 Basic Concept of Python Programming

1.1 Introduction Python is an interpreter, high level, general purpose programming language developed by Guido Van Rossum and its first version was released in 1991. There are two major Python versions: Python 2 and Python 3. Both are quite different. 1.2 Beginning with Python Programming 1.2.1 Finding an Interpreter Before we start Python programming, we need to have an interpreter to interpret and run our programs. Windows: There are many interpreters available freely to run Python scripts like IDLE (Integrated Development Environment) that comes bundled with the Python software downloaded from http://python.org/. Linux: Python comes preinstalled with popular Linux distros such as Ubuntu and Fedora. To check which version of Python you’re running, type “python” in the terminal emulator. The interpreter should start and print the version number. macOS: Generally, Python 2.7 comes bundled with macOS. You’ll have to manually install Python 3 from http://python.org/.

1 - 8 (8 Pages)
USD34.99
 
2 Python Operators

2.1 Operators Operators are those who perform some specific operation. Python has a wide variety of operators. The various python operators are categorized into: 1. Arithmetic operators 2. Comparison/relational operators 3. Assignment operators 4. Logical operators 5. Identity operators 6. Membership operators 7. Bitwise operator

9 - 14 (6 Pages)
USD34.99
 
3 Looping Statement

3.1 Control statement in python Python statements are executed one by one in the same order as they appear in the program. But there may be some requirement when we want to execute the statements based upon a condition. Even there may be some situation where we want to execute a single statement or multiple statement (block of statement) “n” times till the condition is true. So in order to control the flow of execution of the program python provides us control statements. There are two types of control statements: (a) Selection statement (i) if (b) Looping condition (i) While (ii) for

15 - 28 (14 Pages)
USD34.99
 
4 Function in Python Programming

4.1 Introduction to Function in Python Python Functions is a block of related statements designed to perform a computational, logical, or evaluative task. The idea is to put some commonly or repeatedly done tasks together and make a function so that instead of writing the same code again and again for different inputs, we can do the function calls to reuse code contained in it over and over again. Functions can be both built-in or user-defined. Function means sub-program 1. Function definition 2. Function call Example: def message: #function definition print(?hello python”) message() #function call

29 - 36 (8 Pages)
USD34.99
 
5 String in Python Programming

5.1 String Statement String in python is stored as individual characters i.e. indexed wise. The index by default starts with 0. So, here P will be represented by str[0] or str[-6], y will be represented by str[1] or str[-5] Note: strings are immutable and hence you cannot change the individual letters of string using assignment operator. Example: name=“shyam” Name[0]=“A” Result error

37 - 42 (6 Pages)
USD34.99
 
7 Tuple in Python Programming

7.1 Tuple Introduction A tuple is a collection which is order and unchangeable. In python tuples are written with round brackets. Tuples in python are very similar to list which contains different types of elements with the following major differences. It is declared as tuple1=(1,2,3,“ram”,“shyam”) Program implementation import timeit listtime=timeit.timeit(stmt=“[1,2,3,4,5,6,7,8,9]”,number=1000000) tupletime=timeit.timeit(stmt=“(1,2,3,4,5,6,7,8,9)”,number=1000000) print(?List takes time:”, listtime) print(?Tuple takes time:”, tupletime)

55 - 60 (6 Pages)
USD34.99
 
8 Dictionary in Python Programming

8.1 Introduction to Dictionary in Python A dictionary is a collection which is unordered changeable and index. In python dictionaries are written within curly brackets, and they have keys and values. Means the dictionary contains two things first is the key and the second is the value. 8.1.1 Create and Print a Dictionary Example dict1={‘brand’:‘Suzuki’,‘model’:‘dzire’,‘year’:2020} print(dict1) Accessing items: you can access the items of a dictionary by referring to its key name, inside square brackets. Example Accessing items: there is also a method called get() for the same task. dict1={‘brand’:‘Suzuki’,‘model’:‘dzire’,‘year’:2020} print(dict1) y=dict1.get(?model”) print(y)

61 - 66 (6 Pages)
USD34.99
 
9 Numpy in Python Programming

9.1 Introduction Numpy Numpy: is apython package which stands for “Numerical python”. This was created in 2005 by Travis Oliphant. Using numpy we can perform the following functionalities: 1. Mathematical and logical calculation on array. 2. Fourier transforms and routines for shape manipulation. 3. It has built in functions for linear algebra random number generation. 4. Used for scientific calculations. 5. It is faster than python list. 6. It is fast because it is associated with c programming. NumPy is often called as an alternate for MatLab (a programming platform designed specifically for engineers and scientists for data analysis, developing algorithms, create models and application etc.)

67 - 82 (16 Pages)
USD34.99
 
10 Lambda Function in Python Programming

10.1 Lambda Function Lambda Function or anonymous function in python programming A lambda function can take any number of arguments, but can only have one expression. Syntax: Lambda arguments: expression only single line The expression is executed and the result is returned. Example x=lambda a:a+10 Print(x(5))

83 - 86 (4 Pages)
USD34.99
 
11 Pandas in Python Programming

11.1 Introduction Pandas is an open-source Python Library providing high-performance data manipulation and analysis tool using its powerful data structures. The name Pandas is derived from the word Panel Data - an Econometrics from Multidimensional data. In 2008, developer Wes McKinney started developing pandas when in need of high performance, flexible tool for analysis of data. Prior to Pandas, Python was majorly used for data munging and preparation. It had very little contribution towards data analysis. Pandas solved this problem. Using Pandas, we can accomplish five typical steps in the processing and analysis of data, regardless of the origin of data - load, prepare, manipulate, model, and analyze. Python with Pandas is used in a wide range of fields including academic and commercial domains including finance, economics, Statistics, analytics, etc.

87 - 110 (24 Pages)
USD34.99
 
12 Python Pandas Basic Functionality

12.1 Introduction Basic Functionality By now, we learnt about the three Pandas DataStructures and how to create them. We will majorly focus on the DataFrame objects because of its importance in the real time data processing and also discuss a few other DataStructures. 12.2 Series Basic Functionality Let us now create a Series and see all the above tabulated attributes operation Example import pandas as pd import numpy as np #Create a series with 100 random numbers s = pd.Series(np.random.randn(4)) print(s) Its output is as follows: 0 0.967853 1 -0.148368 2 -1.395906 3 -1.758394 dtype: float64

111 - 124 (14 Pages)
USD34.99
 
13 Python Pandas Statistical Functions

13.1 Statistical Functions Statistical methods help in the understanding and analyzing the behavior of data. We will now learn a few statistical functions, which we can apply on Pandas objects. Percent_change Series, DatFrames and Panel, all have the function pct_change(). This function compares every element with its prior element and computes the change percentage. Example import pandas as pd import numpy as np s = pd.Series([1,2,3,4,5,4]) print s.pct_change() df = pd.DataFrame(np.random.randn(5, 2)) print(df.pct_change())

125 - 128 (4 Pages)
USD34.99
 
14 Python Pandas Visualization

14.1 Basic Plotting: plot This functionality on Series and DataFrame is just a simple wrapper around the matplotlib libraries plot() method. Example import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(10,4),index=pd.date_range(‘1/1/2000’, periods=10), columns=list(‘ABCD’)) df.plot() Its output is as follows: If the index consists of dates, it calls gct().autofmt_xdate() to format the x-axis as shown in the above illustration.

129 - 136 (8 Pages)
USD34.99
 
15 Data Visualization

15.1 Data Visualization Data visualization is the graphical representation of information and data. By using different visual elements like charts, graphs and maps. Data visualization tool provides easy way to see the understand the data and related trend/pattern. 1. There are multiple tools available for data visualization using which we can perform data visualization. 2. In python we can use a library called “matplot” for data visualization. 3. Python based plotting library “matplotlib” enables us to produce 2D as well as 3D graphics i.e. charts/graphs. 4. Pyplot interface of matplotlib is used for representing 2D graphs.

137 - 158 (22 Pages)
USD34.99
 
16 Object Oriented Programming in Python

16.1 OOP in python Object-oriented programming (OOP) is a programming language model which organized object and data. 16.1.1 What is Encapsulation If same variable is reapet in two different palce then which problem is solved using encapsulation it means one variable is making private otherwise program generate error. 16.1.2 Abstraction Abstraction in Python is the process of hiding the real implementation of an application from the user and emphasizing only on usage of it. For example, consider you have bought a new electronic gadget. Along with the gadget, you get a user guide, instructing how to use the application, but this user guide has no info regarding the internal working of the gadget. Another example is, when you use TV remote, you do not know how pressing a key in the remote changes the channel internally on the TV. You just know that pressing + volume key will increase the volume.

159 - 184 (26 Pages)
USD34.99
 
17 Modules in Python Programming

17.1 Modules • A module is a file containing python definitions and statements. • A python module is (.py file) containing variables, class definitions, statement and function related to a particular task. The major feature of having module is that its content can be reused in other programs, without having to rewrite or recreate them. • They are executed only the first time the module name is encounter in an import statement. Type of modules: • User defined modules • Built-in modules Ex.-array, math, numpy, sys, etc.

185 - 196 (12 Pages)
USD34.99
 
18 Python Library

18.1 Library Introduction This library contains modules for various types of functionalities. Some commonly use module of python standard library are: (i) math module: which provides mathematical function to support difference types of calaculations. (ii) cmath modules: which provides mathematical function for complex number. (iii) random module: which provides function generation random number. (iv) staticstics module: which provides mathematical satical function. (v) urllib module: which provides URL handling function so that you can access websites from within your program. 1. NmPy library, provides some advance math functionalities along with tools to create and manipulate numeric arrays. 2. Scipy library, provides algorithmic and mathematical tools for scientific calculations.

197 - 204 (8 Pages)
USD34.99
 
19 Turtle Graphics

19.1 Python Turtle Graphics Turtle is a special feathers of Python. Using Turtle, we can easily draw in a drawing board. First we import the turtle module. Then create a window, next we create turtle object and using turtle method we can draw in the drawing board. 19.2 Some Turtle Method Example from turtle import * t = Turtle() #object in python wn=Screen() wn.title(?my first graphic”) wn.bgcolor(?yellow”) #color filling in window t.shape(?turtle”) #turtle shape given t.color(?red”, “green”)

205 - 206 (2 Pages)
USD34.99
 
20 Brief Tour of the Standard Library

20.1 Unit Testing in Python Programming The process of testing wheather a particular unit is working properly or not is called unit testing. A unit test checks small component in your application Example def testsum1(): assert sum([1,2,3])==6 def testsum2(): assert sum([1,1,1])==6 #assertion error testsum1() testsum2() 20.1.1 Step Involved in Unit Testing (1) Import unittest from library. (2) Create a class for test and inherit (unittest.TestCase). (3) Write the test function in the class. (4) Call unittest.main()

207 - 220 (14 Pages)
USD34.99
 
6 List in Python Programming

6.1 List Introduction 1. List is a collection of different values or different types of items. 2. Unlike array in c/c++/java a list is capable of storing different types of values under one roof. 3. The items in the list are separated with the comma (,) and enclosed with the square brackets []. 4. List provides us the facility to store multiple types of in a single unit. Example: a=[“ram”,1,“shyam”,12.5] b=[1,2,3,4] a[0]=ram a=[“ram”,1,“shyam”,12.5] print(a) print(a[0]) ram

43 - 54 (12 Pages)
USD34.99
 
9cjbsk

Browse Subject

Payment Methods