100% found this document useful (1 vote)
7 views

Make Python Talk Build Apps with Voice Control and Speech Recognition 1st Edition Mark Liu pdf download

The document provides information about the book 'Make Python Talk: Build Apps with Voice Control and Speech Recognition' by Mark Liu, which covers setting up Python and creating applications that utilize voice control and speech recognition. It includes chapters on various topics such as speech recognition, building virtual personal assistants, and interactive games. Additionally, it offers resources for further learning and practical applications in finance and gaming.

Uploaded by

sangjeceirin90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
7 views

Make Python Talk Build Apps with Voice Control and Speech Recognition 1st Edition Mark Liu pdf download

The document provides information about the book 'Make Python Talk: Build Apps with Voice Control and Speech Recognition' by Mark Liu, which covers setting up Python and creating applications that utilize voice control and speech recognition. It includes chapters on various topics such as speech recognition, building virtual personal assistants, and interactive games. Additionally, it offers resources for further learning and practical applications in finance and gaming.

Uploaded by

sangjeceirin90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Make Python Talk Build Apps with Voice Control

and Speech Recognition 1st Edition Mark Liu pdf


download

https://ebookmeta.com/product/make-python-talk-build-apps-with-
voice-control-and-speech-recognition-1st-edition-mark-liu/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Make Python Talk Mark H Liu

https://ebookmeta.com/product/make-python-talk-mark-h-liu/

Make Python Talk 1st Edition Mark Liu

https://ebookmeta.com/product/make-python-talk-1st-edition-mark-
liu/

Let's Talk Python: Young coders build software (MEAP


V06) Pavel Anni

https://ebookmeta.com/product/lets-talk-python-young-coders-
build-software-meap-v06-pavel-anni/

Hot Times William R Cox

https://ebookmeta.com/product/hot-times-william-r-cox/
Proceedings of the Third Berkeley Symposium on
Mathematical Statistics and Probability Volume 4
Contributions to Biology and Problems of Health

https://ebookmeta.com/product/proceedings-of-the-third-berkeley-
symposium-on-mathematical-statistics-and-probability-
volume-4-contributions-to-biology-and-problems-of-health/

21st Century Economics Economic Ideas You Should Read


and Remember Bruno S Frey Editor Christoph A
Schaltegger Editor

https://ebookmeta.com/product/21st-century-economics-economic-
ideas-you-should-read-and-remember-bruno-s-frey-editor-christoph-
a-schaltegger-editor/

Integrated Earthquake Simulation 1st Edition M. Hori

https://ebookmeta.com/product/integrated-earthquake-
simulation-1st-edition-m-hori/

Simulation of Thermoelastic Behaviour of Spacecraft


Structures: Fundamentals and Recommendations (Springer
Aerospace Technology) Simon Appel

https://ebookmeta.com/product/simulation-of-thermoelastic-
behaviour-of-spacecraft-structures-fundamentals-and-
recommendations-springer-aerospace-technology-simon-appel/

Dad s Fireman Friend 1st Edition Flora Ferrari

https://ebookmeta.com/product/dad-s-fireman-friend-1st-edition-
flora-ferrari/
Probability and Random Processes 4th Edition Geoffrey
R. Grimmett

https://ebookmeta.com/product/probability-and-random-
processes-4th-edition-geoffrey-r-grimmett/
MAKE
P Y T H O N TA L K
B U I L D A P P S W ITH V O I C E C O N T R O L
A N D S P E E C H R E C O G N I T I O N

MARK LIU
MAKE
P Y T H O N TA L K
Build Apps with
Vo i c e C o n t r o l a n d
Speech Recognition

b y Ma rk L i u

San Francisco
MAKE PYTHON TALK. Copyright © 2021 by Mark Liu.

All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.

ISBN-13: 978-1-7185-0156-0 (print)


ISBN-13: 978-1-7185-0157-7 (ebook)

Publisher: William Pollock


Production Manager: Rachel Monaghan
Production Editor: Paula Williamson
Developmental Editor: Liz Chadwick
Cover Illustrator: Gina Redman
Interior Design: Octopod Studios
Technical Reviewer: Noah Spahn
Copyeditor: Sharon Wilkey
Compositor: Jeff Lytle, Happenstance Type-O-Rama
Proofreader: Paula Fleming
Indexer: JoAnne Burek

For information on book distributors or translations, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900; [email protected]
www.nostarch.com

Library of Congress Control Number: 2021938060

No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other
product and company names mentioned herein may be the trademarks of their respective owners. Rather
than use a trademark symbol with every occurrence of a trademarked name, we are using the names only
in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of
the trademark.
Dedicated to Ivey, Andrew, and all
MS Finance students (past, present, and
future) at the University of Kentucky.
About the Author
Dr. Mark H. Liu is the founding director of the Master of Science in Finance
program at the University of Kentucky, where he holds the title of Associate
Professor of Finance with tenure. He has a Ph.D. in finance from Boston
College, and has been published in top finance journals, including Journal of
Financial Economics, Journal of Financial and Quantitative Analysis, and Journal
of Corporate Finance. Dr. Liu has more than 20 years of coding experience in
C++, SAS, Stata, and Python and runs Python workshops for Finance master
students at the University of Kentucky. He has also incorporated Python in
finance courses he is teaching.

About the Technical Reviewer


Noah Spahn is presently enjoying the role of Software Engineer for the
Computer Security Group at UCSB (known as SecLab) and their world-
famous hacking team: Shellphish. Prior to his current academic role, he
ran his own consulting business, allowing him to work on a wide variety of
projects, with a broad spectrum and languages, and collaborate with vary-
ing teams. Fluency in Python has opened many doors for Spahn, providing
the opportunity to contribute to the areas of natural sciences (ocean-
ography, ecohydrology, seismology), computer science (network traffic
analysis, machine learning, binary analysis), open-source projects (NASA,
Kubernetes, and others), as well as many practical applications. Spahn
holds a Master of Software Engineering degree from California State
University, Fullerton. He has taught courses in Python at the University of
California and Santa Barbara’s interdisciplinary Collaboratory, and has
taught an upper-division course on the concepts of programming lan-
guages at Westmont College. Spahn is glad to teach anyone who is interested
in learning.
BRIEF CONTENTS

Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix

PART I: GETTING STARTED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Chapter 1: Setting Up Python, Anaconda, and Spyder . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Chapter 2: Python Refresher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

PART II: LEARNING TO TALK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53


Chapter 3: Speech Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Chapter 4: Make Python Talk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

Chapter 5: Speaking Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Chapter 6: Web Scraping Podcasts, Radios, and Videos . . . . . . . . . . . . . . . . . . . . . . . . . 111

Chapter 7: Building a Virtual Personal Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Chapter 8: Know-It-All VPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

PART III: INTERACTIVE GAMES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167


Chapter 9: Graphics and Animation with the turtle Module . . . . . . . . . . . . . . . . . . . . . . . 169

Chapter 10: Tic-Tac-Toe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

Chapter 11: Connect Four . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

Chapter 12: Guess-the-Word Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

Chapter 13: Smart Games: Adding Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

PART IV: GOING FURTHER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269


Chapter 14: Financial Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

Chapter 15: Stock Market Watch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295

Chapter 16: Use World Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309


Chapter 17: Ultimate Virtual Personal Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

Appendix A: Install Modules to Play Audio Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

Appendix B: Suggested Answers to End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . 353

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369

viii Brief Contents


CO N T E N T S I N D E TA I L

ACKNOWLEDGMENTS XVII
INTRODUCTION XIX

PART I: GETTING STARTED 1


1
SETTING UP PYTHON, ANACONDA, AND SPYDER 3
Introducing Anaconda and Spyder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Installing Anaconda and Spyder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Install Anaconda and Spyder in Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Install Anaconda and Spyder in macOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Install Anaconda and Spyder in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Using Spyder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Write Python in Spyder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Inspect Code in Spyder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Understanding Coding in Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Python Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Basic Operations in Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2
PYTHON REFRESHER 13
Variables and Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Floats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Bools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Convert Variable Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Rules for Variable Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Loops and Conditional Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Conditional Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Loops in Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Loop Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
String Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
String Slicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
String Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Create a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Access Elements in a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Use a List of Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Add or Multiply Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
List Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Use Built-in Functions with Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
list() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Access Values in a Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Use Dictionary Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
How to Use Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Switch Keys and Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Combine Two Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Use Built-in Python Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Define Your Own Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Import Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Create Your Own Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Use Third-Party Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Create a Virtual Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Activate the Virtual Environment in Windows . . . . . . . . . . . . . . . . . . . . . . . . 46
Set Up Spyder in the Virtual Environment in Windows . . . . . . . . . . . . . . . . . . 47
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

PART II: LEARNING TO TALK 53


3
SPEECH RECOGNITION 55
Install the SpeechRecognition Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
In Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
In Mac or Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Test and Fine-Tune SpeechRecognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Import SpeechRecognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Test SpeechRecognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Fine-Tune the Speech Recognition Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Perform a Voice-Controlled Web Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Use the webbrowser Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Add Voice Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Perform a Google Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Open Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Use the os and pathlib Modules to Access and Open Files . . . . . . . . . . . . . . . 65
Open Files via Voice Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Create and Import a Local Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Create the Local Module mysr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Import mysr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

x Contents in Detail
4
MAKE PYTHON TALK 73
Install the Text-to-Speech Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Test Your Text-to-Speech Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Repeat After Me . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Customize the Speech . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Retrieve Default Settings in the pyttsx3 Module in Windows . . . . . . . . . . . . . . 81
Adjust Speech Properties in the pyttsx3 Module in Windows . . . . . . . . . . . . . . 82
Customize the gTTS Module in Mac or Linux . . . . . . . . . . . . . . . . . . . . . . . . . 82
Build the Local mysay Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Create mysay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Import mysay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Build a Voice-Controlled Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Read a File Aloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

5
SPEAKING APPLICATIONS 89
Create Your Self-Made Local Python Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
What’s a Python Package? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Create Your Own Python Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Test Your Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
More on Python Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Interactive Guess the Number Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Speaking Newscast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Scrape the News Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Add the Text-to-Speech Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Voice-Controlled Wikipedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Access Wikipedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Add Speech Recognition and Text to Speech . . . . . . . . . . . . . . . . . . . . . . . . 103
Voice-Activated Music Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Traverse Files in a Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Python, Play Selena Gomez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Python, Play a Country Song . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

6
WEB SCRAPING PODCASTS, RADIOS, AND VIDEOS 111
A Primer on Web Scraping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
What Is HTML? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Extract Information with Beautiful Soup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Scrape Live Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Voice-Activated Podcasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Extract and Play Podcasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Voice-Activate Podcasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

Contents in Detail xi
Voice-Activated Radio Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Install the selenium Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Control Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Voice-Activate Live Radio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Voice-Activated Videos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7
BUILDING A VIRTUAL PERSONAL ASSISTANT 133
An Overview of Your VPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Download VPA Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Install the arrow Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Manage the Standby Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Create the Local Module mywakeup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Set Some Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Ask Your VPA to Set a Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Tell the Time with Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Build a Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Create the mytimer Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Set the Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Ask Your VPA to Set an Alarm Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Build an Alarm Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Create the Alarm Clock Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Set an Alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Ask Your VPA to Tell a Joke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Create Your Joke List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Create a Joke Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Tell a Joke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Send Hands-Free Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Send Email with Written Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Create the Email Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Add the Email Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

8
KNOW-IT-ALL VPA 155
Get Answers from WolframAlpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Apply for an API Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Retrieve Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Explore Different Areas of Knowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Add a Know-It-All Functionality to Your VPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
What WolframAlpha Cannot Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Create the myknowall Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
A VPA That Can Answer (Almost) Any Question for You . . . . . . . . . . . . . . . . 165
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

xii Contents in Detail


PART III: INTERACTIVE GAMES 167
9
GRAPHICS AND ANIMATION WITH THE TURTLE MODULE 169
Basic Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Create a turtle Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Create Movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Basic Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Use the dot() Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Draw Your Own Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Draw Grid Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
How Animation Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Use Multiple Turtles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

10
TIC-TAC-TOE 189
Game Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Draw the Game Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Create the Game Pieces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
How Mouse Clicks Work in turtle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Convert Mouse Clicks to Cell Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Place Game Pieces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Determine Valid Moves, Wins, and Ties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Voice-Controlled Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

11
CONNECT FOUR 207
Game Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Draw the Game Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
The Mouse-Click Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Drop a Disc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Animate the Falling Discs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Determine Valid Moves, Wins, and Ties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
The Voice-Controlled Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

12
GUESS-THE-WORD GAME 227
Game Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Draw the Game Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
The Text Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Load the Coins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Guess the Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Determine Valid Guesses, Wins, and Losses . . . . . . . . . . . . . . . . . . . . . . . . 234

Contents in Detail xiii


Exploring the Variety of Random
Documents with Different Content
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for


the “Right of Replacement or Refund” described in paragraph 1.F.3,
the Project Gutenberg Literary Archive Foundation, the owner of the
Project Gutenberg™ trademark, and any other party distributing a
Project Gutenberg™ electronic work under this agreement, disclaim
all liability to you for damages, costs and expenses, including legal
fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR
NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR
BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL
NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving
it, you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or
entity that provided you with the defective work may elect to provide
a replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation,


the trademark owner, any agent or employee of the Foundation,
anyone providing copies of Project Gutenberg™ electronic works in
accordance with this agreement, and any volunteers associated with
the production, promotion and distribution of Project Gutenberg™
electronic works, harmless from all liability, costs and expenses,
including legal fees, that arise directly or indirectly from any of the
following which you do or cause to occur: (a) distribution of this or
any Project Gutenberg™ work, (b) alteration, modification, or
additions or deletions to any Project Gutenberg™ work, and (c) any
Defect you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.

You might also like