An Introduction to Python Programming: A Practical Approach
eBook - ePub

An Introduction to Python Programming: A Practical Approach

step-by-step approach to Python programming with machine learning fundamental and theoretical principles.

Dr. Krishna Kumar Mohbey; Dr. Brijesh Bakariya

Share book
  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

An Introduction to Python Programming: A Practical Approach

step-by-step approach to Python programming with machine learning fundamental and theoretical principles.

Dr. Krishna Kumar Mohbey; Dr. Brijesh Bakariya

Book details
Book preview
Table of contents
Citations

About This Book

step-by-step approach to Python programming with machine learning fundamental and theoretical principles.

Key Features
? Introduces readers to Python programming in a very simple way.
? Extensive practical demonstration of Python concepts using numerous examples.
? Implementation of machine learning in Python using hands-on techniques.

Description
The book 'Introduction to Python Programming: A Practical Approach' lays out a path for readers who want to pursue a career in the field of computer software development. It covers the fundamentals of Python programming as well as machine learning principles. Students will benefit from the examples that are included with each concept, which will aid them in understanding the concept.This book provides a practical understanding of Python programming using numerous programs and examples. It also develops problem-solving and code-writing abilities for the readers. This book covers Python fundamentals, operators, and data structures such as strings, lists, dictionaries, and tuples. It also contains information on file and exception handling. The implementation of a machine learning model has also been included in this book.With the help of this book, students and programmers can improve their programming skills as well as their ability to sprint towards a rewarding career.

What you will learn
? Learn Python concepts, operators, and data structures.
? Learn the properties and operations of lists, tuples, and dictionaries.
? Write Python code to solve specific issues.
? Write Python code to handle disk files and exceptions.
? Work with OOPS properties like classes, objects, constructors, inheritance, and polymorphism.

Who this book is for
This book is intended for current and aspiring emerging technology professionals, students, and anyone else who wishes to better understand the Python programming language and machine learning concepts.

Table of Contents
1. Chapter 1: Basics of Python Programming
2. Chapter 2: Operators and Expressions
3. Chapter 3: Control Flow Statements
4. Chapter 4: Functions
5. Chapter 5: Strings
6. Chapter 6: Lists
7. Chapter 7: Tuple
8. Chapter 8: Dictionaries
9. Chapter 9: File Handling
10. Chapter 10: Exception Handling, Modules, and Packages
11. Chapter 11: Object-oriented Programming
12. Chapter 12: Machine Learning with Python
13. Chapter 13: Clustering with Python

About the Authors
Dr. Krishna Kumar Mohbey is an assistant professor of Computer Science at the Central University of Rajasthan, India. He completed his Ph.D. from the Department of Mathematics and Computer Applications from the National Institute of Technology Bhopal, India (2015). His areas of interest are machine learning, data mining, mobile web services, big data analysis, and user behavior analysis. He has authored three books on different subjects and published more than 25 research articles in reputed journals and conferences. LinkedIn Profile: https://in.linkedin.com/in/dr-k-k-mohbey-78947448 Dr. Brijesh Bakariya is working as an assistant professor for the Department of Computer Science and Engineering, I.K. Gujral Punjab Technical University (IKGPTU) Jalandhar (Punjab). He completed his Ph.D. degree from Maulana Azad National Institute of Technology (NIT- Bhopal), Madhya Pradesh (2016). He has authored 01 books and published more than 15 research papers in the journals of international repute in areas of data mining, image processing, machine learning, etc. LinkedIn Profile: https://www.linkedin.com/in/brijesh-bakariya-72b0237a

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is An Introduction to Python Programming: A Practical Approach an online PDF/ePUB?
Yes, you can access An Introduction to Python Programming: A Practical Approach by Dr. Krishna Kumar Mohbey; Dr. Brijesh Bakariya in PDF and/or ePUB format, as well as other popular books in Informatique & Programmation en Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2021
ISBN
9789391392062

CHAPTER 1

Basics of Python Programming

Nowadays, Python is one of the most popular programming languages. There are many reasons for this, but simply it is easy to read and write Python code. Python provides vast libraries for which you can efficiently make your program. In this chapter, you will see various features, installation, and the making of a simple program of Python.

Structure

In this chapter, we will cover the following topics:
  • Basic features and history of Python
  • Installing Python and running Python program to IDE
  • Writing and executing first Python program
  • Brief description about various concepts used in Python

Objective

The objective of this chapter is to introduce the concept of Python, its features, and the Installation procedure in Windows and Linux. After completing this chapter, you should be familiar with Python IDE and editors. Also, you will be able to write simple Python programs.

Understanding Python

Python is one of the high-level languages. There are various advantages of high-level languages:
  • Program is easier and understandable which is written in a high-level language
  • Program is shorter in a high-level language
  • The code written in a high-level language is portable, which means it can run on different computers with some modifications.
Due to these preceding advantages, almost all programs are written in high-level languages. Guido van Rossum designed Python in 1991; after that, Python released various versions as shown in table 1.1:
Python Version
Released Year
3.9
2020
3.8
2019
3.7
2018
3.6
2016
2.7
2010
Table 1.1: Python versions with released year
The compiler completes the task which is involved in the compilation process. Moreover, it converts a source code to object code, and after that, the program will be converted to machine understandable code. But an interpreter reads a high-level program and executes it. Python does not follow the compilation process; it is used only as an interpreter. That's why from a computation point of view, Python is very fast. The figures can easily understand it.
Here figure 1.1 shows the structure of the compiler. A compiler translates source code into an object code, which a hardware executor runs:
Figure 1.1: Structure of Compiler
Here figure 1.2, shows the structure of the interpreter. An interpreter processes the program in less time, and it also takes less time to read lines and perform computations:
Figure 1.2: Structure of Interpreter
Python is an interpreted language because an interpreter executes Python programs, but the compilation process is also done in Python. The compilation part is hidden from the programmer that is why it is known as an interpreted language.
There are various reasons Python has become more popular:
  • It is easy to use because its coding is written in a simple English language. Users can easily understand and write code into Python, so it takes less time to write a program.
  • It is a very powerful language because it has many libraries where you can easily make a program. An inbuilt library has lots of inbuilt functions where you can insert as per your need.
  • It is an object-oriented programming language that is why it follows all the object-oriented concepts.
  • It is integrated with other programming languages such as C, C++, Java, etc.
  • It is platform-independent, which means if you created a program in one operating system, you could also run that program in another operating system.
  • It is free and open-source, which means you can install it on your computer without any cost. It can be copied or modifie...

Table of contents