Tiny Python Projects

Youens-Clark, Ken

  • 出版商: Manning
  • 出版日期: 2020-09-01
  • 定價: $1,400
  • 售價: 9.0$1,260
  • 語言: 英文
  • 頁數: 440
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1617297518
  • ISBN-13: 9781617297519
  • 相關分類: Python程式語言
  • 相關翻譯: 趣味微項目,輕松學Python (簡中版)
  • 立即出貨

買這商品的人也買了...

相關主題

商品描述

Tiny Python Projects takes you from amateur to Pythonista as you create 22 bitesize programs. Each tiny project teaches you a new programming concept, from the basics of lists and strings right through to regular expressions and randomness.

Summary
A long journey is really a lot of little steps. The same is true when you're learning Python, so you may as well have some fun along the way Written in a lighthearted style with entertaining exercises that build powerful skills, Tiny Python Projects takes you from amateur to Pythonista as you create 22 bitesize programs. Each tiny project teaches you a new programming concept, from the basics of lists and strings right through to regular expressions and randomness. Along the way you'll also discover how testing can make you a better programmer in any language.

About the technology
Who says learning to program has to be boring? The 21 activities in this book teach Python fundamentals through puzzles and games. Not only will you be entertained with every exercise, but you'll learn about text manipulation, basic algorithms, and lists and dictionaries as you go. It's the ideal way for any Python newbie to gain confidence and experience.

About the book
The projects are tiny, but the rewards are big: each chapter in Tiny Python Projects challenges you with a new Python program, including a password creator, a word rhymer, and a Shakespearean insult generator. As you complete these entertaining exercises, you'll graduate from a Python beginner to a confident programmer--and you'll have a good time doing it

What's inside

  • Write command-line Python programs
  • Manipulate Python data structures
  • Use and control randomness
  • Write and run tests for programs and functions
  • Download testing suites for each project

About the reader
For readers with beginner programming skills.

About the author
Ken Youens-Clark is a Senior Scientific Programmer at the University of Arizona. He has an MS in Biosystems Engineering and has been programming for over 20 years.

Table of Contents

1 How to write and test a Python program

2 The crow's nest: Working with strings

3 Going on a picnic: Working with lists

4 Jump the Five: Working with dictionaries

5 Howler: Working with files and STDOUT

6 Words count: Reading files and STDIN, iterating lists, formatting strings

7 Gashlycrumb: Looking items up in a dictionary

8 Apples and Bananas: Find and replace

9 Dial-a-Curse: Generating random insults from lists of words

10 Telephone: Randomly mutating strings

11 Bottles of Beer Song: Writing and testing functions

12 Ransom: Randomly capitalizing text

13 Twelve Days of Christmas: Algorithm design

14 Rhymer: Using regular expressions to create rhyming words

15 The Kentucky Friar: More regular expressions

16 The Scrambler: Randomly reordering the middles of words

17 Mad Libs: Using regular expressions

18 Gematria: Numeric encoding of text using ASCII values

19 Workout of the Day: Parsing CSV files, creating text table output

20 Password strength: Generating a secure and memorable password

21 Tic-Tac-Toe: Exploring state

22 Tic-Tac-Toe redux: An interactive version with type hints

商品描述(中文翻譯)

《微型Python專案》帶領你從新手成為Pythonista,透過創建22個小型程式來學習Python。每個微型專案都教授你一個新的程式設計概念,從列表和字串的基礎知識到正則表達式和隨機性。總結:一個漫長的旅程實際上是許多小步驟的結果。當你學習Python時也是如此,所以你可以在這個過程中玩得開心。《微型Python專案》以輕鬆愉快的風格撰寫,並提供有趣的練習來建立強大的技能,從新手到Pythonista,你將創建22個小型程式。每個微型專案都教授你一個新的程式設計概念,從列表和字串的基礎知識到正則表達式和隨機性。在這個過程中,你還將發現測試如何使你成為任何語言中更好的程式設計師。關於技術:誰說學習程式設計一定要無聊?這本書中的21個活動通過謎題和遊戲來教授Python基礎知識。每個練習都能帶給你娛樂,同時你還將學習到有關文本操作、基本算法、列表和字典的知識。這是任何Python新手獲得信心和經驗的理想方式。關於本書:這些專案很小,但回報很大:《微型Python專案》的每一章都會向你提出一個新的Python程式,包括密碼生成器、詞語押韻器和莎士比亞侮辱生成器。當你完成這些有趣的練習時,你將從Python初學者成為自信的程式設計師,而且你會玩得開心。內容簡介:- 編寫命令行Python程式- 操作Python數據結構- 使用和控制隨機性- 為程式和函數編寫和運行測試- 下載每個專案的測試套件。讀者對象:具有初級程式設計技能的讀者。關於作者:Ken Youens-Clark是亞利桑那大學的高級科學程式設計師。他擁有生物系統工程碩士學位,並從事程式設計工作已有20多年。目錄:1. 如何編寫和測試Python程式2. 乌鸦巢:處理字串3. 野餐:處理列表4. 跳過五:處理字典5. 哭喊:處理文件和標準輸出6. 詞語計數:讀取文件和標準輸入,迭代列表,格式化字串7. Gashlycrumb:在字典中查找項目8. 蘋果和香蕉:查找和替換9. 撥號詛咒:從詞語列表中生成隨機侮辱語10. 電話:隨機變異字串11. 啤酒瓶之歌:編寫和測試函數12. 贖金:隨機大寫文本13. 十二天的聖誕節:算法設計14. 押韻者:使用正則表達式創建押韻詞語15. 肯塔基修士:更多的正則表達式16. 混亂者:隨機重新排列單詞的中間部分17. 瘋狂的填空:使用正則表達式18. Gematria:使用ASCII值對文本進行數字編碼19. 每日鍛煉:解析CSV文件,創建文本表格輸出20. 密碼強度:生成安全且易記的密碼21. 井字遊戲:探索狀態22. 井字遊戲redux:帶有類型提示的互動版本

作者簡介

Ken Youens-Clark works at the University of Arizona as a senior scientific programmer. He has an MS in biosystems engineering, and has been programming for over 20 years.

作者簡介(中文翻譯)

Ken Youens-Clark 在亞利桑那大學擔任高級科學程式設計師。他擁有生物系統工程的碩士學位,並且已經從事程式設計超過20年。