• Complain

Sweigart - Automate the Boring Stuff with Python: Practical Programming for Total Beginners

Here you can read online Sweigart - Automate the Boring Stuff with Python: Practical Programming for Total Beginners full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: San Francisco, year: 2020;2015, publisher: No Starch Press, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Sweigart Automate the Boring Stuff with Python: Practical Programming for Total Beginners
  • Book:
    Automate the Boring Stuff with Python: Practical Programming for Total Beginners
  • Author:
  • Publisher:
    No Starch Press
  • Genre:
  • Year:
    2020;2015
  • City:
    San Francisco
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Automate the Boring Stuff with Python: Practical Programming for Total Beginners: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Automate the Boring Stuff with Python: Practical Programming for Total Beginners" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Automate the Boring Stuff with Python teaches simple programming skills to automate everyday computer tasks.

Sweigart: author's other books


Who wrote Automate the Boring Stuff with Python: Practical Programming for Total Beginners? Find out the surname, the name of the author of the book and a list of all author's works by series.

Automate the Boring Stuff with Python: Practical Programming for Total Beginners — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Automate the Boring Stuff with Python: Practical Programming for Total Beginners" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Automate the Boring Stuff with Python: Practical Programming for Total Beginners
Albert Sweigart
Published by No Starch Press
For my nephew Jack
About the Author

Al Sweigart is a software developer and tech book author living in San Francisco. Python is his favorite programming language, and he is the developer of several open source modules for it. His other books are freely available under a Creative Commons license on his website http://www.inventwithpython.com/ . His cat weighs 14 pounds.

About the Tech Reviewer

Ari Lacenski is a developer of Android applications and Python software. She lives in San Francisco, where she writes about Android programming at http://gradlewhy.ghost.io/ and mentors with Women Who Code. Shes also a folk guitarist.

Acknowledgments

I couldnt have written a book like this without the help of a lot of people. Id like to thank Bill Pollock; my editors, Laurel Chun, Leslie Shen, Greg Poulos, and Jennifer Griffith-Delgado; and the rest of the staff at No Starch Press for their invaluable help. Thanks to my tech reviewer, Ari Lacenski, for great suggestions, edits, and support.

Many thanks to our Benevolent Dictator For Life, Guido van Rossum, and everyone at the Python Software Foundation for their great work. The Python community is the best one Ive found in the tech industry.

Finally, I would like to thank my family, friends, and the gang at Shotwells for not minding the busy life Ive had while writing this book. Cheers!

Introduction

Youve just done in two hours what it takes the three of us two days to do. My college roommate was working at a retail electronics store in the early 2000s. Occasionally, the store would receive a spreadsheet of thousands of product prices from its competitor. A team of three employees would print the spreadsheet onto a thick stack of paper and split it among themselves. For each product price, they would look up their stores price and note all the products that their competitors sold for less. It usually took a couple of days.

You know, I could write a program to do that if you have the original file for the printouts, my roommate told them, when he saw them sitting on the floor with papers scattered and stacked around them.

After a couple of hours, he had a short program that read a competitors price from a file, found the product in the stores database, and noted whether the competitor was cheaper. He was still new to programming, and he spent most of his time looking up documentation in a programming book. The actual program took only a few seconds to run. My roommate and his co-workers took an extra-long lunch that day.

This is the power of computer programming. A computer is like a Swiss Army knife that you can configure for countless tasks. Many people spend hours clicking and typing to perform repetitive tasks, unaware that the machine theyre using could do their job in seconds if they gave it the right instructions.

Whom Is This Book For?

Software is at the core of so many of the tools we use today: Nearly everyone uses social networks to communicate, many people have Internet-connected computers in their phones, and most office jobs involve interacting with a computer to get work done. As a result, the demand for people who can code has skyrocketed. Countless books, interactive web tutorials, and developer boot camps promise to turn ambitious beginners into software engineers with six-figure salaries.

This book is not for those people. Its for everyone else.

On its own, this book wont turn you into a professional software developer any more than a few guitar lessons will turn you into a rock star. But if youre an office worker, administrator, academic, or anyone else who uses a computer for work or fun, you will learn the basics of programming so that you can automate simple tasks such as the following:

  • Moving and renaming thousands of files and sorting them into folders
  • Filling out online forms, no typing required
  • Downloading files or copy text from a website whenever it updates
  • Having your computer text you custom notifications
  • Updating or formatting Excel spreadsheets
  • Checking your email and sending out prewritten responses

These tasks are simple but time-consuming for humans, and theyre often so trivial or specific that theres no ready-made software to perform them. Armed with a little bit of programming knowledge, you can have your computer do these tasks for you.

Conventions

This book is not designed as a reference manual; its a guide for beginners. The coding style sometimes goes against best practices (for example, some programs use global variables), but thats a trade-off to make the code simpler to learn. This book is made for people to write throwaway code, so theres not much time spent on style and elegance. Sophisticated programming concepts like object-oriented programming, list comprehensions, and generators arent covered because of the complexity they add. Veteran programmers may point out ways the code in this book could be changed to improve efficiency, but this book is mostly concerned with getting programs to work with the least amount of effort.

What Is Programming?

Television shows and films often show programmers furiously typing cryptic streams of 1s and 0s on glowing screens, but modern programming isnt that mysterious. Programming is simply the act of entering instructions for the computer to perform. These instructions might crunch some numbers, modify text, look up information in files, or communicate with other computers over the Internet.

All programs use basic instructions as building blocks. Here are a few of the most common ones, in English:

  • Do this; then do that.
  • If this condition is true, perform this action; otherwise, do that action.
  • Do this action that number of times.
  • Keep doing that until this condition is true.

You can combine these building blocks to implement more intricate decisions, too. For example, here are the programming instructions, called the source code , for a simple program written in the Python programming language. Starting at the top, the Python software runs each line of code (some lines are run only if a certain condition is true or else Python runs some other line) until it reaches the bottom.

passwordFile = open('SecretPasswordFile.txt') secretPassword = passwordFile.read() print('Enter your password.') typedPassword = input() if typedPassword == secretPassword: print('Access granted') if typedPassword == '12345': print('That password is one that an idiot puts on their luggage.') else: print('Access denied')

You might not know anything about programming, but you could probably make a reasonable guess at what the previous code does just by reading it. First, the file SecretPasswordFile.txt is opened , and the secret password in it is read . Then, the user is prompted to input a password (from the keyboard) . These two passwords are compared , and if theyre the same, the program prints Access granted to the screen . Next, the program checks to see whether the password is 12345 and hints that this choice might not be the best for a password . If the passwords are not the same, the program prints Access denied to the screen .

What Is Python?

Python refers to the Python programming language (with syntax rules for writing what is considered valid Python code) and the Python interpreter software that reads source code (written in the Python language) and performs its instructions. The Python interpreter is free to download from

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Automate the Boring Stuff with Python: Practical Programming for Total Beginners»

Look at similar books to Automate the Boring Stuff with Python: Practical Programming for Total Beginners. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Automate the Boring Stuff with Python: Practical Programming for Total Beginners»

Discussion, reviews of the book Automate the Boring Stuff with Python: Practical Programming for Total Beginners and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.