Similar authors to follow
See more recommendations
Customers Also Bought Items By
If you've ever spent hours renaming files or updating hundreds of spreadsheet cells, you know how tedious tasks like these can be. But what if you could have your computer do them for you?
In this fully revised second edition of the best-selling classic Automate the Boring Stuff with Python, you'll learn how to use Python to write programs that do in minutes what would take you hours to do by hand--no prior programming experience required. You'll learn the basics of Python and explore Python's rich library of modules for performing specific tasks, like scraping data off websites, reading PDF and Word documents, and automating clicking and typing tasks.
The second edition of this international fan favorite includes a brand-new chapter on input validation, as well as tutorials on automating Gmail and Google Sheets, plus tips on automatically updating CSV files. You'll learn how to create programs that effortlessly perform useful feats of automation to:
• Search for text in a file or across multiple files
• Create, update, move, and rename files and folders
• Search the Web and download online content
• Update and format data in Excel spreadsheets of any size
• Split, merge, watermark, and encrypt PDFs
• Send email responses and text notifications
• Fill out online forms
Step-by-step instructions walk you through each program, and updated practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks.
Don't spend your time doing work a well-trained monkey could do. Even if you've never written a line of code, you can make your computer do the grunt work. Learn how in Automate the Boring Stuff with Python, 2nd Edition.
You've completed a basic Python programming tutorial or finished Al Sweigart's bestseller, Automate the Boring Stuff with Python. What's the next step toward becoming a capable, confident software developer?
Welcome to Beyond the Basic Stuff with Python. More than a mere collection of advanced syntax and masterful tips for writing clean code, you'll learn how to advance your Python programming skills by using the command line and other professional tools like code formatters, type checkers, linters, and version control. Sweigart takes you through best practices for setting up your development environment, naming variables, and improving readability, then tackles documentation, organization and performance measurement, as well as object-oriented design and the Big-O algorithm analysis commonly used in coding interviews. The skills you learn will boost your ability to program--not just in Python but in any language.
• Coding style, and how to use Python's Black auto-formatting tool for cleaner code
• Common sources of bugs, and how to detect them with static analyzers
• How to structure the files in your code projects with the Cookiecutter template tool
• Functional programming techniques like lambda and higher-order functions
• How to profile the speed of your code with Python's built-in timeit and cProfile modules
• The computer science behind Big-O algorithm analysis
• How to make your comments and docstrings informative, and how often to write them
• How to create classes in object-oriented programming, and why they're used to organize code
Toward the end of the book you'll read a detailed source-code breakdown of two classic command-line games, the Tower of Hanoi (a logic puzzle) and Four-in-a-Row (a two-player tile-dropping game), and a breakdown of how their code follows the book's best practices. You'll test your skills by implementing the program yourself.
Of course, no single book can make you a professional software developer. But Beyond the Basic Stuff with Python will get you further down that path and make you a better programmer, as you learn to write readable code that's easy to debug and perfectly Pythonic
Requirements: Covers Python 3.6 and higher
In Automate the Boring Stuff with Python, you’ll learn how to use Python to write programs that do in minutes what would take you hours to do by hand—no prior programming experience required. Once you’ve mastered the basics of programming, you’ll create Python programs that effortlessly perform useful and impressive feats of automation to:
–Search for text in a file or across multiple files
–Create, update, move, and rename files and folders
–Search the Web and download online content
–Update and format data in Excel spreadsheets of any size
–Split, merge, watermark, and encrypt PDFs
–Send reminder emails and text notifications
–Fill out online forms
Step-by-step instructions walk you through each program, and practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks.
Don’t spend your time doing work a well-trained monkey could do. Even if you’ve never written a line of code, you can make your computer do the grunt work. Learn how in Automate the Boring Stuff with Python.
Note: The programs in this book are written to run on Python 3.
This book was written to be understandable by kids as young as 10 to 12 years old, although it is great for anyone of any age who has some familiarity with Python.
Begin by building classic games like Hangman, Guess the Number, and Tic-Tac-Toe, and then work your way up to more advanced games, like a text-based treasure hunting game and an animated collision-dodging game with sound effects. Along the way, you’ll learn key programming and math concepts that will help you take your game programming to the next level.
Learn how to:
–Combine loops, variables, and flow control statements into real working programs
–Choose the right data structures for the job, such as lists, dictionaries, and tuples
–Add graphics and animation to your games with the pygame module
–Handle keyboard and mouse input
–Program simple artificial intelligence so you can play against the computer
–Use cryptography to convert text messages into secret code
–Debug your programs and find common errors
As you work through each game, you’ll build a solid foundation in Python and an understanding of computer science fundamentals.
What new game will you create with the power of Python?
The projects in this book are compatible with Python 3.
After a crash course in Python programming basics, you’ll learn to make, test, and hack programs that encrypt text with classical ciphers like the transposition cipher and Vigenère cipher. You’ll begin with simple programs for the reverse and Caesar ciphers and then work your way up to public key cryptography, the type of encryption used to secure today’s online transactions, including digital signatures, email, and Bitcoin.
Each program includes the full code and a line-by-line explanation of how things work. By the end of the book, you’ll have learned how to code in Python and you’ll have the clever programs to prove it!
You’ll also learn how to:
- Combine loops, variables, and flow control statements into real working programs
- Use dictionary files to instantly detect whether decrypted messages are valid English or gibberish
- Create test programs to make sure that your code encrypts and decrypts correctly
- Code (and hack!) a working example of the affine cipher, which uses modular arithmetic to encrypt a message
- Break ciphers with techniques such as brute-force and frequency analysis
There’s no better way to learn to code than to play with real programs. Cracking Codes with Python makes the learning fun!
Each game includes easy-to-follow instructions, review questions, and creative coding challenges to make the game your own. Want to add more levels or a cheat code? No problem, just write some code.
You’ll learn to make games like:
–Maze Runner: escape the maze!
–Snaaaaaake: gobble apples and avoid your own tail
–Asteroid Breaker: smash space rocks
–Fruit Slicer: a Fruit Ninja clone
–Brick Breaker: a remake of Breakout, the brick-breaking classic
–Platformer: a game inspired by Super Mario Bros.
Learning how to program shouldn’t be dry and dreary. With Scratch Programming Playground, you’ll make a game of it!
Uses Scratch 2
This curated collection of simple Python projects lets you dive right in and make digital art, games, animations, number-crunching tools and more – right away! Forget standard step-by-step tutorials; instead, author Al Sweigart takes a learn-by-doing approach that provides you with over 80 programs to manually copy, run, and play with. Once you see how the code works, it’s time to experiment with your own changes and practice re-creating them yourself.
Each project is a standalone mini-chapter that includes a sample run of the program’s output, the source code, and suggestions for customization. Whether it’s a vintage screensaver, a snail-racing game, a clickbait headline generator, or animated strands of your DNA, these simple, text-based programs are small – limited to 256 lines of code or less – and designed to be self-contained in a single source-code file so you can easily post and share them online.
● Hangman, Blackjack and other games to play against a computer or your friends
● Simulations of a spreading forest fire, a million dice rolls, and a Japanese abacus
● Animation programs, like a fish tank, a rotating cube, and a bouncing DVD logo
● Mazes that you design then escape from, and a 3D Maze Runner-like video game
● Encryption programs that use ciphers like ROT13 and Vigenère to conceal text
For those who’ve mastered basic Python syntax and are ready to have fun making programs, the projects in this book will spark new ideas for what’s possible within just a few pages of code.
Scratch, the colorful drag-and-drop programming language, is used by millions of first-time learners worldwide. Scratch 3 features an updated interface, new programming blocks, and the ability to run on tablets and smartphones, so you can learn how to code on the go.
In Scratch 3 Programming Playground, you'll learn to code by making cool games. Get ready to destroy asteroids, shoot hoops, and slice and dice fruit! Each game includes easy-to-follow instructions with full-color images, review questions, and creative coding challenges to make the game your own. Want to add more levels or a cheat code? No problem, just write some code.
You'll learn to make games like:
• Maze Runner: escape the maze!
• Snaaaaaake: gobble apples and avoid your own tail
• Asteroid Breaker: smash space rocks
• Fruit Slicer: a Fruit Ninja clone
• Brick Breaker: a remake of Breakout, the brick-breaking classic
• Platformer: a game inspired by Super Mario Bros
Learning how to program shouldn't be dry and dreary. With Scratch 3 Programming Playground, you'll make a game of it!
Covers: Scratch 3
US-Besteseller: Gegen stumpfsinnige Computeraufgaben!
- Neuauflage auf Python 3 aktualisiert
- Lernen Sie, Python-Programme zu schreiben, die Ihnen automatisch alle möglichen Aufgaben abnehmen
- Mit Schritt-für-Schritt-Anleitungen zu jedem Programm
Wenn Sie jemals Stunden damit verbracht haben, Dateien umzubenennen oder Hunderte von Tabelleneinträgen zu aktualisieren, dann wissen Sie, wie stumpfsinnig manche Tätigkeiten sein können. Wie wäre es, den Computer dazu zu bringen, diese Arbeiten zu übernehmen?
In diesem Buch lernen Sie, wie Sie mit Python Aufgaben in Sekundenschnelle erledigen können, die sonst viel Zeit in Anspruch nehmen würden. Programmiererfahrung brauchen Sie dazu nicht: Wenn Sie einmal die Grundlagen gemeistert haben, werden Sie Python-Programme schreiben, die automatisch alle möglichen praktischen Aufgaben für Sie abarbeiten:
- eine oder eine Vielzahl von Dateien nach Texten durchsuchen
- Dateien und Ordner erzeugen, aktualisieren, verschieben und umbenennen
- das Web durchsuchen und Inhalte herunterladen
- Excel-Dateien aktualisieren und formatieren
- PDF-Dateien teilen, zusammenfügen, mit Wasserzeichen versehen und verschlüsseln
- Erinnerungsmails und Textnachrichten verschicken
- Online-Formulare ausfüllen
Schritt-für-Schritt-Anleitungen führen Sie durch jedes Programm und Übungsaufgaben am Ende jedes Kapitels fordern Sie dazu auf, die Programme zu verbessern und Ihre Fähigkeiten auf ähnliche Problemstellungen zu richten.
Verschwenden Sie nicht Ihre Zeit mit Aufgaben, die auch ein gut dressierter Affe erledigen könnte. Bringen Sie Ihren Computer dazu, die langweilige Arbeit zu machen!
"The best part of programming is the triumph of seeing the machine do something useful. (This book) frames all of programming as these small triumphs; it makes the boring fun."
You've mined for diamonds, crafted dozens of tools, and built all sorts of structures--but what if you could program robots to do all of that for you in a fraction of the time?
In Coding with Minecraft®, you'll create a virtual robot army with Lua, a programming language used by professional game developers. Step-by-step coding projects will show you how to write programs that automatically dig mines, collect materials, craft items, and build anything that you can imagine. Along the way, you'll explore key computer science concepts like data types, functions, variables, and more.
Learn how to:
- Program robots that make smart decisions with flow control
- Reuse code so that your robots can farm any crop you want, including wheat, sugar cane, and even cacti!
- Program a factory that generates infinite building supplies
- Design an algorithm for creating walls and buildings of any size
- Code yourself a pickaxe-swinging robotic lumberjack!
- Create a robot that digs mine shafts with stairs so you can explore safely
Bonus activities in each chapter will help you take your coding skills to the next level. By the end of the book, you'll understand how powerful coding can be and have plenty of robots at your beck and call.