- عنوان کتاب: The Python Workbook 3rd Edition
- نویسنده: Ben Stephenson
- حوزه: مهندسی داده
- سال انتشار: 2025
- تعداد صفحه: 281
- زبان اصلی: انگلیسی
- نوع فایل: pdf
- حجم فایل: 24.0 مگابایت
من معتقدم که برنامهنویسی کامپیوتر مهارتی است که به بهترین شکل با عمل کردن آموخته میشود. اگرچه خواندن در مورد برنامهنویسی و تماشای معلمی که در کلاس درس برنامهای را ایجاد میکند ارزشمند است، اما صرف وقت پشت صفحهکلید برای حل مسائل و بهکارگیری مفاهیمی که با آنها آشنا شدهاید در عمل بسیار مهمتر است. این کتاب با در نظر گرفتن این اصل نوشته شده است. اکثر صفحات آن به تمرینها و راهحلهای آنها اختصاص داده شده است و تنها چند صفحه در ابتدای هر فصل مفاهیم لازم را به طور خلاصه معرفی میکند. در این کتاب ۲۱۲ تمرین وجود دارد که رشتههای دانشگاهی و موقعیتهای روزمره متنوعی را در بر میگیرد. تعدادی از تمرینها مسائل کلاسیک علوم کامپیوتر هستند، اما بیشتر آنها فرصتی برای مقابله با مسائلی از سایر زمینههای تحصیلی و دنیای اطراف شما ارائه میدهند. هر تمرینی که انجام میدهید، درک شما از زبان برنامهنویسی پایتون را تقویت میکند، تواناییهای برنامهنویسی شما را بهبود میبخشد و به شما این امکان را میدهد که چالشهای برنامهنویسی بعدی را به طور مؤثرتری برطرف کنید. راهحلهای تقریباً نیمی از تمرینها در نیمه دوم این کتاب ارائه شده است. اگر در یک تمرین گیر کردید، نگاهی سریع به راهحل من ممکن است به شما کمک کند تا بدون نیاز به کمک شخص دیگری، مشکل خود را حل کنید. بسیاری از راهحلها شامل حاشیهنویسیهای مختصری هستند که رویکرد مورد استفاده برای حل مسئله را توضیح میدهند یا نکته خاصی از سینتکس پایتون را برجسته میکنند. این حاشیهنویسیها را در کادرهای سایهدار خواهید یافت که تشخیص آنها را از خود راهحلها آسان میکند. امیدوارم حتی زمانی که بدون مواجهه با هیچ مشکلی به راهحل خود میرسید، برای مقایسه راهحلهای خود با راهحلهای من وقت بگذارید. انجام این مقایسه ممکن است نقصی در برنامه شما را نشان دهد یا به شما کمک کند با تکنیکی آشنا شوید که میتوانستید برای حل آسانتر مسئله از آن استفاده کنید. راهحلهایی که ارائه دادهام همچنین سبک برنامهنویسی خوبی را نشان میدهند، از جمله نظرات مناسب، نامهای متغیر معنادار و استفاده حداقلی از اعداد جادویی. من شما را تشویق میکنم که هنگام ایجاد راهحلهای خود از سبک برنامهنویسی خوبی استفاده کنید تا آنها نتیجه صحیح را محاسبه کنند و در عین حال واضح، قابل فهم و قابل بهروزرسانیهای آینده باشند. طول راهحل من بلافاصله پس از عنوان هر تمرین درج شده است. در حالی که نباید انتظار داشته باشید که طول راهحل شما دقیقاً با من مطابقت داشته باشد، امیدوارم ارائه طول راهحل من مانع از گمراهی بیش از حد شما قبل از تجدیدنظر در رویکردتان یا درخواست کمک شود. عبارت «حل شد» بلافاصله قبل از طول راهحل ظاهر میشود، در حالی که راهحل من در نیمه دوم کتاب یافت میشود. این کتاب را میتوان به روشهای مختلفی استفاده کرد. مقدمههای مختصر آن در مورد مفاهیم برنامهنویسی پایتون و مجموعه گسترده تمرینها، این امکان را فراهم میکند که به عنوان تنها کتاب درسی در یک دوره مقدماتی برنامهنویسی استفاده شود. همچنین میتوان از آن به عنوان مکمل کتاب درسی دیگری که فقط شامل تعداد محدودی تمرین است، استفاده کرد. یک فرد باانگیزه میتواند تنها با استفاده از این کتاب، برنامهنویسی در پایتون را به خود بیاموزد. با این حال، شاید راههای آسانتری برای یادگیری زبان وجود داشته باشد، زیرا مقدمههای مختصر فقط مهمترین جنبههای هر موضوع را پوشش میدهند، بدون اینکه هر مورد خاص یا شرایط غیرمعمول را بررسی کنند. مهم نیست از چه منابع دیگری برای این کتاب استفاده میکنید، در صورت وجود، خواندن فصلهای آن، تکمیل تمرینهای آن و مطالعه راهحلهای ارائه شده، توانایی برنامهنویسی شما را افزایش میدهد.
I believe that computer programming is a skill that is best learned by doing. While it is valuable to read about programming, and to watch a teacher create a program at the front of a classroom, it is far more important to spend time at the keyboard solving problems and putting the concepts you have been introduced to into practice. This book was written with this principle in mind. The majority of its pages are dedicated to exercises and their solutions, with only a few pages at the beginning of each chapter that concisely introduce the necessary concepts. There are 212 exercises in this book, which span a variety of academic disciplines and everyday situations. A few of the exercises are classical computer science problems, but most of them offer the opportunity to tackle problems from other fields of study and the world around you. Each exercise that you complete will strengthen your understanding of the Python programming language, improve your programming abilities, and allow you to tackle subsequent programming challenges more effectively. Solutions to approximately half of the exercises are provided in the second half of this book. If you become stuck on an exercise, a quick peek at my solution may help you work through your problem without requiring assistance from someone else. Many of the solutions include brief annotations that explain the approach used to solve the problem or highlight a specific point of Python syntax. You will find these annotations in shaded boxes, making it easy to distinguish them from the solutions themselves. I hope that you will take the time to compare your solutions with mine, even when you arrive at your solution without encountering any problems. Performing this comparison may reveal a flaw in your program, or help you become familiar with a technique that you could have used to solve the problem more easily. The solutions that I have provided also demonstrate good programming style, including appropriate comments, meaningful variable names, and minimal use of magic numbers. I encourage you to use good programming style when creating your solutions, so that they compute the correct result while also being clear, easy to understand, and amenable to future updates. The length of my solution has been included immediately after each exercise’s title. While you shouldn’t expect the length of your solution to match mine exactly, I hope that providing the length of my solution will prevent you from going too far astray before reconsidering your approach or seeking assistance. “Solved” appears immediately ahead of the solution’s length when my solution can be found in the second half of the book. This book can be used in a variety of ways. Its concise introductions to Python programming concepts, and extensive collection of exercises, allow it to be used as the lone textbook in an introductory programming course. It can also be used to supplement another textbook that includes only a limited selection of exercises. A motivated individual could teach themselves to program in Python using only this book. However, there are, perhaps, easier ways to learn the language because the concise introductions only cover each topic’s most important aspects, without examining every special case or unusual circumstance. No matter what other resources you use with this book, if any, reading its chapters, completing its exercises, and studying the provided solutions will enhance your programming ability.
این کتاب را میتوانید از لینک زیر بصورت رایگان دانلود کنید:
Download: The Python Workbook 3rd Edition
نظرات کاربران