Statistics
9
Views
0
Downloads
0
Donations
Support
Share
Uploader

高宏飞

Shared on 2026-02-17

AuthorMusa Arda

This book is an in-depth and activity-based introduction to the intermediate level topics of Python programming. It follows a step-by-step practical approach by combining the theory of the language with the hands-on coding exercises including quizzes, projects, assignments and exams. We begin by setting up the development environment, the PyCharm IDE. Then we cover Exception Handling, Modules & Packages, Format Operations and File Operations in Python. Further we cover one of the most important topics in computer programming which is OOP (Object Oriented Programming). We build two big projects that are the PDF & CSV Operations and the Movie Library with Tkinter. Especially in the Movie Library we build a real world project which you can use as a reference in your programming life. You will also have assignments after each project. And finally we have the final exam which will let you to test your Python level. By the end of the book, you will learn almost all of the intermediate level concepts of Python in great detail by writing thousands of lines of code. All the supplementary resources (code files, quizzes, assignments, final exam etc.) are available for download at the Github repository. The link for the repository is provided in the book. This is the second book in Hands-On Python Series. And here is what you will find in this book: Theory: In each topic, we will cover all the Theoretical Details with example coding. Coding Exercises (50 questions): At the end of each chapter, we will have Coding Exercise, Quizzes, of 10 questions. Projects (2): We will have 2 Projects in this book. You will learn how to apply Python concepts on real world problems. Assignments (2): After each project, you will have an Assignment. These assignments will let you build the project from scratch on your own. Final Exam: At the end of this book you will have the Final Exam. It is a multiple choice exam with 20 questions and a limited duration. The exam will let you to

Tags
No tags
ISBN: B09NMCVWXT
Publisher: Kindle Edition
Publish Year: 2021
Language: 英文
Pages: 648
File Format: PDF
File Size: 15.0 MB
Support Statistics
¥.00 · 0times
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

(This page has no text content)
HANDS-ON PYTHON with 50 Exercises, 2 Projects, 2 Assignments & Final Exam INTERMEDIATE Musa Arda
Hands-On Python with 50 Exercises, 2 Projects, 2 Assignments & Final Exam: Intermediate By Musa Arda Copyright © 2021 Musa Arda. All rights reserved. No portion of this book or its supplementary materials may be reproduced in any form without permission from the publisher, except as permitted by U.S. copyright law. For permissions contact: python.hands.on.book@gmail.com
Contents Preface 1. Introduction 2. IDE - PyCharm Basics 3. Exception Handling 4. Modules & Packages 5. Format Operations 6. File Operations 7. Project 1 - Working with PDF & CSV Files 8. Assignment 1 - Working with PDF & CSV Files 9. OOP 10. Project 2 - Movie Library with Tkinter 11. Assignment 2 - Movie Library with Tkinter 12. Final Exam 13. Conclusion
Preface
About This Book This book is an in-depth and activity-based introduction to the intermediate level topics of Python programming. It follows a step-by-step practical approach by combining the theory of the language with the hands-on coding exercises including quizzes, projects, assignments and exams. We begin by setting up the development environment, the PyCharm IDE. Then we cover Exception Handling, Modules & Packages, Format Operations and File Operations in Python. Further we cover one of the most important topics in computer programming which is OOP (Object Oriented Programming). We build two big projects that are the PDF & CSV Operations and the Movie Library. Especially in the Movie Library we build a real world project which you can use as a reference in your programming life. You will also have assignments after each project. And finally we have the final exam which will let you to test your Python level. By the end of the book, you will learn almost all of the intermediate level concepts of Python in great detail by writing thousands of lines of code. All the supplementary resources (code files, quizzes, assignments, final exam etc.) are available for download at the Github repository. The link for the repository is provided in the book. This is the second book in Hands-On Python Series. And here is what you will find in this book: Theory: In each topic, we will cover all the Theoretical Details with example coding. Coding Exercises (50 questions): At the end of each chapter, we will have Coding Exercise, Quizzes, of 10 questions. Projects (2): We will have 2 Projects in this book. You will
learn how to apply Python concepts on real world problems. Assignments (2): After each project, you will have an Assignment. These assignments will let you build the project from scratch on your own. Final Exam: At the end of this book you will have the Final Exam. It is a multiple choice exam with 20 questions and a limited duration. The exam will let you to test your Python level.
About Hands-On Python Series This is the second book in our Hands-On Python Series. And it covers the intermediate level topics. So we assume that you already know the introductory concepts of Python programming like; Variables, Functions, Conditional Statements, Loops, Strings, Lists, Dictionaries, Tuples, Sets and Comprehensions. If you don’t feel comfortable with these topics, you are strongly recommended to finish the first book in our series, which is the Beginner book. Here, you can find it.[1]
About the Author Musa Arda has Bachelor’s degree from Industrial Engineering in 2007, and he has been working as a Software Developer for more than 14 years. He uses many programming languages and platforms like; Python, C#, Java, JavaScript, SAP ABAP, SQL, React, Flutter and more. He creates online learning content and writes books to share his experience and knowledge with his students. His main purpose is to combine theory and hands-on practice in his teaching resources. That's why there are hundreds of programming exercises, quizzes, tests, projects, exams and assignments in all of his courses and books. He is dedicated to help his students to learn programming concepts in depth via a practical and exiting way.
How to Contact Us Please feel free to get in contact with the author. To comment or ask technical questions about this book, you can send email to python.hands.on.book@gmail.com.
1. Introduction
Who Is This Book For? The goal of this book is to help students to learn Python programming language in a hands-on and project-based manner. With its unique style of combining theory and practice, this book is for: people who are new to computer science and programming people who are new to Python people who want to gain solid Python Skills people who want to learn Python by doing Projects, Quizzes, Coding Exercises, Tests and Exams people who want to learn Python for Machine Learning, Deep Learning, Data Science and Software Development in general anyone who wants to learn real Python
What Can You Expect to Learn? The purpose of this book is to provide you a good introduction to the intermediate topics of Python programming. In general, you will gain solid programming skills and grasp the main idea of software development. In particular, here are some highlights on what you can you expect to learn with this book. You will: learn & master Programming Fundamentals, Coding Algorithms and Computer Science Concepts go from Intermediate to Advanced level in Python with hands- on approach do exercises on fundamental topics of Python with 5 Quizzes and 50 Coding Exercises build 2 Real-World Project with Python and do 2 Assignments related to these projects take the Final Exam on Python with 20 questions to assess your learning build Python applications with PyCharm and master it learn Python fundamentals you need for Machine Learning, Deep Learning, Data Science and Application Development gain solid and profound Python Programming skills needed for a Python career
Outline of This Book In Chapter 1, you will get the basics of the book. You will learn about this books approach to Python programming and how to get most out of it. In Chapter 2, you will meet PyCharm, our IDE (Integrated Development Environment) for this book. You will learn all the basics of PyCharm and how to do debugging with it. You will also learn the base interpreter and interpreter configuration. In Chapter 3, you will learn how to handle exceptions in your code. Exception Handling is one of the most important topics in programming. You will learn and practice the try-except-else- finally structure in detail. In Chapter 4, you will learn Modules & Packages in Python. You will also define your custom modules and use them in your programs. In Chapter 5, will see Format Operations in detail. You will learn how to format the Strings in Python. The ways will be Format Operator, String.Format, f-Strings and Template Strings. In Chapter 6, you will learn the File Operations in Python. You will read and write files, delete, move and copy them, create folders and learn how to search over files & folders. In Chapter 7, you will have your first project. You will work on PDF and CSV files in Python. You will read and write CSV & PDF files, create new PDF’s and merge them. In Chapter 8, you will have your first assignment. It is based on the PDF & CSV Project in Chapter 7 but with missing code segments in it. Don’t worry, you will have the guidelines to complete the project on your own. Chapter 9 is on one of the main building blocks of programming which OOP. OOP stands for Object Oriented
Programming and it’s crucial if you want to develop real world applications. You will learn and practice OOP and its core concepts in great detail. In Chapter 10, you will have the second project. It is mainly on OOP concepts like classes, objects and inheritance. You will use Python’s built-in Tkinter Module and develop a Movie Library with it. Chapter 11 is your second assignment. This time you will try develop the Movie Library project in Chapter 10 on your own by completing the missing code segments. Chapter 12 is your Final Exam. Now it’s time to assess your Python level. You will have an exam of 20 questions on the topics you learned in this book. The Final Exam will give you the chance to see what you learned and which topics you should repeat. Chapter 13 is the Conclusion. You will finalize this book and will see how you should proceed for the next step.
Conventions Used in This Book The following typographical conventions are used in this book: Italic Indicates new URLs, email addresses, filenames, and file extensions. Bold Indicates new terms and important concepts to pay attention. Constant width Used for string literals and programming concepts within paragraphs. Constant width bold Used for program elements within paragraphs, such as variable or function names, data types, statements, and keywords. We will write our code in the code cells. Here is an example code cell with the cell number as 7: Figure 1-1: A code cell example used in this book
Using Code Examples You can find all the supplementary resources for the book (code files, quizzes, assignments, final exam etc.) available for download at https://github.com/musaarda/python-hands-on-book- intermediate.
You & This Book This book is designed in a way that, you can learn and practice Python. At each chapter you will learn the basic concepts and how to use them with examples. Then you will have a quiz of 10 questions at the end of the chapter. First you will try to solve the quiz questions on your own, then I will provide the solutions in detail. You will have projects after each block of core concepts. And after every project you will an assignment to test your understanding. This will be your path to learn real Python. Before we deep dive into Python, I want to give you some tips for how you can get most out of this book: Read the topics carefully before you try to solve the quizzes Try to code yourself while you are reading the concepts in the chapters Try to solve quizzes by yourself, before checking the solutions Read the quiz solutions and try to replicate them Code the projects line by line with the book Do the assignments (seriously) Do not start a new chapter before finishing and solving quiz of the previous one Repeat the topics you fail in the Final Exam Learning takes time, so give yourself enough time digest the concepts
2. IDE - PyCharm Basics
A Brief History of Python Python is a widely used and general-purpose, high-level programming language[2]. Its design philosophy emphasizes code readability and its syntax allows programmers to express concepts in fewer lines of code. Python is dynamically-typed and garbage- collected. It supports multiple programming paradigms, including procedural, object-oriented and functional programming. It was initially designed by Guido van Rossum in the late 1980s and developed by Python Software Foundation. Python was named after the BBC TV show Monty Python's Flying Circus. In 1991, Van Rossum published the code labeled version 0.9.0. Then in 1994, Python reached version 1.0. Python 2.0 was released in 2000, which started the Python 2.x family that has been used widely for almost a decade. The final release, Python 2.7.18, occurred on 2020 and marked the end-of- life of Python 2. As of January 1st, 2020 no new bug reports, fixes, or changes will be made to Python 2, and Python 2 is no longer supported. Python 3.0 (also called "Python 3000" or "Py3K") was released on December 3, 2008 and it was a major, backwards-incompatible release. Since Python 3.0 broke backward compatibility, much Python 2 code does not run unmodified on Python 3. Although some old projects still use Python 2, the preferred approach is using Python 3. As of this writing, the latest version is 3.10, but every code we write in this book should run on Python 3.6 or any later version.