Programming for the Puzzled: Learn to Program While Solving Puzzles (MIT Press)
暫譯: 解謎編程:在解謎中學習編程 (MIT Press)
Srini Devadas
- 出版商: MIT
- 出版日期: 2017-11-03
- 售價: $1,125
- 貴賓價: 9.8 折 $1,103
- 語言: 英文
- 頁數: 272
- 裝訂: Paperback
- ISBN: 0262534304
- ISBN-13: 9780262534307
-
相關分類:
Algorithms-data-structures、程式語言
-
相關翻譯:
編程的樂趣 用 Python 解算法謎題 (Programming for the Puzzled: Learn to Program While Solving Puzzles) (簡中版)
立即出貨 (庫存 < 3)
相關主題
商品描述
Learning programming with one of "the coolest applications around": algorithmic puzzles ranging from scheduling selfie time to verifying the six degrees of separation hypothesis.
This book builds a bridge between the recreational world of algorithmic puzzles (puzzles that can be solved by algorithms) and the pragmatic world of computer programming, teaching readers to program while solving puzzles. Few introductory students want to program for programming's sake. Puzzles are real-world applications that are attention grabbing, intriguing, and easy to describe.
Each lesson starts with the description of a puzzle. After a failed attempt or two at solving the puzzle, the reader arrives at an Aha! moment -- a search strategy, data structure, or mathematical fact -- and the solution presents itself. The solution to the puzzle becomes the specification of the code to be written. Readers will thus know what the code is supposed to do before seeing the code itself. This represents a pedagogical philosophy that decouples understanding the functionality of the code from understanding programming language syntax and semantics. Python syntax and semantics required to understand the code are explained as needed for each puzzle.
Readers need only the rudimentary grasp of programming concepts that can be obtained from introductory or AP computer science classes in high school. The book includes more than twenty puzzles and more than seventy programming exercises that vary in difficulty. Many of the puzzles are well known and have appeared in publications and on websites in many variations. They range from scheduling selfie time with celebrities to solving Sudoku problems in seconds to verifying the six degrees of separation hypothesis. The code for selected puzzle solutions is downloadable from the book's website; the code for all puzzle solutions is available to instructors.
商品描述(中文翻譯)
學習程式設計,透過「最酷的應用之一」:從安排自拍時間到驗證六度分隔假說的算法謎題。
本書在算法謎題(可以用算法解決的謎題)的娛樂世界與計算機程式設計的實用世界之間架起了一座橋樑,教導讀者在解謎的同時學習程式設計。很少有初學者會單純為了程式設計而程式設計。謎題是真實世界的應用,吸引注意、引人入勝且易於描述。
每一課都以謎題的描述開始。在解謎的過程中經歷一兩次失敗後,讀者會迎來一個「啊哈!」的時刻——一種搜尋策略、數據結構或數學事實——解答隨之而來。謎題的解答成為要編寫的程式碼的規範。因此,讀者在看到程式碼之前就會知道程式碼應該做什麼。這代表了一種教學哲學,將理解程式碼的功能與理解程式語言的語法和語義解耦。為了理解程式碼所需的 Python 語法和語義,會根據每個謎題的需要進行解釋。
讀者只需具備從高中入門或 AP 計算機科學課程中獲得的基本程式設計概念。本書包含超過二十個謎題和超過七十個難度不一的程式設計練習。許多謎題是眾所周知的,並以多種變體出現在出版物和網站上。它們的範圍從與名人安排自拍時間到在幾秒鐘內解決數獨問題,再到驗證六度分隔假說。選定謎題解答的程式碼可從本書網站下載;所有謎題解答的程式碼對於教師也可用。