[PDF Download] Python for teenagers: learn to program like a superhero! 2nd edition payne full chapt

Page 1


Visit to download the full and correct content document: https://textbookfull.com/product/python-for-teenagers-learn-to-program-like-a-superhe ro-2nd-edition-payne/

More products digital (pdf, epub, mobi) instant download maybe you interests ...

Python for Teenagers: Learn to Program Like a Superhero! James R Payne

https://textbookfull.com/product/python-for-teenagers-learn-toprogram-like-a-superhero-james-r-payne/

Learn to Program with Python 3: A Step-by-Step Guide to Programming, 2nd Edition Irv Kalb

https://textbookfull.com/product/learn-to-program-withpython-3-a-step-by-step-guide-to-programming-2nd-edition-irvkalb/

Learn Raspberry Pi Programming with Python: Learn to Program on the World’s Most Popular Tiny Computer, 2nd Edition Wolfram Donat

https://textbookfull.com/product/learn-raspberry-pi-programmingwith-python-learn-to-program-on-the-worlds-most-popular-tinycomputer-2nd-edition-wolfram-donat/

Learn to Program with Python 3: A Step-by-Step Guide to Programming Irv Kalb

https://textbookfull.com/product/learn-to-program-withpython-3-a-step-by-step-guide-to-programming-irv-kalb/

PHP and Algorithmic Thinking for the Complete Beginner 2nd Edition Learn to Think Like a Programmer Bouras

https://textbookfull.com/product/php-and-algorithmic-thinkingfor-the-complete-beginner-2nd-edition-learn-to-think-like-aprogrammer-bouras/

Learn Raspberry Pi Programming with Python: Learn to Program on the World's Most Popular Tiny Computer Donat

https://textbookfull.com/product/learn-raspberry-pi-programmingwith-python-learn-to-program-on-the-worlds-most-popular-tinycomputer-donat/

Teach Your Kids to Code A Parent Friendly Guide to Python Programming 1st Edition Bryson Payne

https://textbookfull.com/product/teach-your-kids-to-code-aparent-friendly-guide-to-python-programming-1st-edition-brysonpayne/

Learn Python in One Day and Learn It Well 2nd Edition

Jamie Chan

https://textbookfull.com/product/learn-python-in-one-day-andlearn-it-well-2nd-edition-jamie-chan/

Python One Liners Write Concise Eloquent Python Like a Professional 1st Edition Christian Mayer

https://textbookfull.com/product/python-one-liners-write-conciseeloquent-python-like-a-professional-1st-edition-christian-mayer/

Python for Teenagers

Learn to Program like a Superhero!

2nd ed.

James R. Payne

Gainesville, GA, USA

ISBN 978-1-4842-9987-6 e-ISBN 978-1-4842-9988-3

https://doi.org/10.1007/978-1-4842-9988-3

© James R. Payne 2019, 2024

Standard Apress

The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a speciic statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.

The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional afiliations.

This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature. The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.

To my wife Whitney Payne, for always believing and pretending not to notice when I yell at the computer.

To my parents, Ronnie and Sharon Payne, and my brother, also Ronnie Payne, who all mysteriously have “ron” in their name and who always told me I could become whatever I wanted in life, even when I told them I wanted to be Batman.

To Dorjan Williams, who, years ago, helped me create a universe of ridiculous comic book characters. To Eric Miller, who helps me solve problems big and small, including slaying a dragon in my backyard, so that I can focus – sometimes – on getting work done. Nicholas Rini introduced me to both programming and comic books, and without him, this book would not exist. Nanci Packard and Wendy White provided inspiration with their use of words so big they couldn’t possibly it in a book. Thanks to members of the old Dev Shed crew: Jennifer Ruggieri –who got me the job that got me the book (more than once) – Charles Fagundes, and Keith Lee, for coding help and reminding me (frequently) that my cup overloweth. Jose Escalante, I thank you here because you were the only one that could see John Cena. Enrique Stone… you know what you did.

Jacquelyn Jurian, for reminding me to write by making me remind you to write.

A special thanks to Sophie “the Bulldog” Payne for letting me use her likeness in this book and always being such a good helper in the kitchen. You will always be missed.

I would be remiss if I failed to thank the mad titan, Thanos, who helped me accomplish so much with just a snap of his ingers. Mister T pitied this fool, while Richard C. helped me “hit ’em with the Hein!” And lastly, thank you to a handful of the writers that inspire me: A. Lee Martinez, Neil Gaiman, Frank Miller, Alan Moore, Jim Starlin, and Stephen King – can’t you guys write any faster?

Introduction

Who This Book Is For

This book is intended for teenagers looking to program in Python. While that technically means anyone aged 13 through 18, the truth of the matter is anyone of any age can (and should, if I do say so myself!) pick up this book if they want to learn either (a) how to program in Python, (b) how to program as a beginner, or (c) add Python to their current skill set.

Above all, if you are holding this book in your hand, intrepid adventurer, then this book is for you. The future is dependent on young heroes like yourself, eager to learn the art of coding and go out into the world and safeguard it from nefarious hackers, dubiously programmed applications, and the rise of artiicially intelligent robots!

So, whether you are in sixth grade or in college, this book will grant you with superpowers galore. Sure, you won’t be able to see through walls or lift cars over your head once you inish this book. However, you will be able to speak the language of computers and create some pretty cool programs.

And what could be better than that?

What You Will Learn in This Book

Chapter 1 provides an overview of programming and Python and then shows you how to install Python and a Python IDLE, which will allow you to create your own Python programs and test your code.

In Chapter 2, we will discuss mathematical functions (things like division, addition, and multiplication) and learn about the different data types used by Python. We will also begin to build the foundation of a fun superhero generator app – “Superhero Generator 3000”!

Chapter 3 delves into how to work with text – also known as strings. We take a look at the different types of storage Python offers as well. We wrap things up by looking at common string functions and build another section of our Superhero Generator 3000 application.

Sometimes a program will need to take a certain action depending upon feedback from a user or from other inluences. This is known as decision-making and is the topic of Chapter 4.

Programming logic and loops – known as iterations, where code can “loop” or repeat itself based on certain conditions – are covered in

Chapter 5.

Chapter 6 is a refresher course of what you have learned up until this point. We will use all the knowledge we’ve acquired to inish building the irst complete version of Superhero Generator 3000. By the end, you will be able to randomly create heroes with unique superpowers, names, and battle statistics!

In Chapter 7, we begin to learn more advanced techniques. To be a real coder, you must learn eficiency and reduce mistakes in your code. That is where modules and built-in functions come into play. Learn what they are and why they will make your life a whole lot easier in this exciting chapter!

Chapter 8 looks at even more advanced topics: speciically, we will cover the basics of object-oriented programming (OOP) and cover objects and classes and deine a thing called polymorphism.

To switch things up a little bit, Chapter 9 will look at some different types of data structures, including tuples and dictionaries.

Chapter 10 brings us up to speed on how to create – and work with – iles inside of directories.

One of my personal favorite chapters is Chapter 11, which covers a topic that is near and dear to my heart: Python for Gaming. We will stroll through the world of video games and learn how to work with video game elements, including sound, animation, and more!

Learning how to create games that interact with a user’s actions and making images move within a game are truly what make games enjoyable. Chapter 12 continues the topic of gaming and focuses speciically on game animation.

In Chapter 13 – don’t worry, in this case 13 is lucky, for you at least! – we move into areas of Python we have not yet discussed that do not it in their own chapter. This includes how to debug – or ind broken code. We also look at advanced modules and other topics.

Finally, we sum everything up in Chapter 14 and cover a wide range of topics, including how to ind work as a Python programmer, common interview questions, the future of Python, and career paths, and answer some of the frequently asked questions (FAQs) about our favorite programming language.

So now that we know what we will learn, let’s put on our cape and superhero outits and get ready to leap tall buildings – of knowledge.

Why I Started Programming

I started programming a long, long time ago – back before the Internet or cell phones existed and when wild dinosaurs roamed the earth. Back then, computers didn’t have images on them like they do today. Everything was text-based – even most of our games – the horror! While we did have some computer games with animation and graphics, they were 8-bit and not cinematic like the ones of today.

I was fortunate enough to share a computer with my older brother. I’m pretty certain my parents didn’t know what a computer was used for, but must have thought: “This future-device will surely make my children Men… of… the… Future… future… future… future…” (just pretend the word is echoing).

And to some degree, they were correct: if they hadn’t purchased my brother and me a computer, who knows what I would be doing with my life right now? Certainly not writing this book and helping you to program like a hero!

But having a giant paperweight made of jumbled electronics – back then we called it an Apple IIe – wasn’t enough to entice me to use it all that much. After all, I happened to own a Nintendo Entertainment System (NES) as well, and it had an amazing slew of games that I still –embarrassingly – play to this day.

What really got me into computers was this: I had a friend, Nicholas Rini, who knew all about programming computers. He showed me one day how to “hack” into the code of a few of our favorite text-based games to give ourselves an advantage. It was akin to creating your very own cheat code in a video game. In particular, we played a game called Lemonade Stand, which was exactly the same as standing outside your house and selling homemade Lemonade, only you never made real money and you didn’t get a sunburn.

In the game, you started out with a couple of dollars – barely enough to make any real proit. However, once we looked at the code running the game, we igured out that we could start out with however much money we wanted if we just changed a few words around. Soon enough, I was the world’s irst millionaire Lemonade Stand mogul. I was hooked.

From there, it was not a far stretch to conceive that we could actually create our own video games, and that is exactly what we did. From complex role-playing games (RPG) based off of our favorite comic books and Dungeons & Dragons to programs that would ask our friends a series of questions and then make fun of them based off of their answers – shenanigans!

While all of that seemed silly at the time, looking back on it I now know that it helped set the foundation for my love of programming and, to a degree, writing (though I began writing much earlier than that). Without that summer of programming fun, I would never have had the wonderful experiences, friends, jobs, and writing opportunities that have come my way ever since.

And, mostly, I would never have had the fun of programming either.

That is what I am hoping to pass on to you, dear reader: a lifetime love of programming and opportunities all based off of one thing – the fun and joy of writing computer programs and writing code.

Sure, programming applications can be a pain in the butt. You will ind yourself banging your head against a keyboard on many nights and yelling at the computer screen for hours only to ind that your program isn’t working because you forgot a parenthesis () somewhere.

But – once you ind that mistake that you or another programmer made – there isn’t quite anything like that triumphant moment when you realize that you – YOU – are the greatest coder of all time!

Programming Dos and Don’ts

When reading this book, you may ind yourself feeling the urge to skip ahead a little or might want to skip an exercise or two. As in all things in life, this piece of advice holds true in learning to program as well: if you cheat, you are only cheating yourself.

To help keep you on the straight and narrow, here are some dos and don’ts for reading this book and for learning how to program, in general:

Do read the book straight through. While you might be okay to skip a chapter or an exercise here or there, keep in mind that this book is all about building a foundation of not just coding language, but coding

practices, theory, and an understanding of programming principles that you can take with you that apply to other languages as well.

Don’t copy and paste code from this book or any other source (assuming you have a digital copy). Instead, take the time to type in the code so that you can begin to get a feel for writing code and, perhaps, commit some of the code to memory through repetition.

Do experiment with code. One of the best ways, I’ve found, to learn how to truly code is to experiment. If you come across an example in the book, feel free to change the parameters some and see what happens. The worst that can happen is that you can fail. The best? That you learn something new!

Don’t be afraid to Google other tutorials and how-tos on Python. This book is supposed to build a beginner’s foundation, but it does not teach you everything there is to know – that’s what the sequel is for! If you do decide to look up comparative examples, be certain to look at the date of the article and the version of Python. If the version does not match the version we are using in this book (Python 3), odds are your code will not work, and you will ind yourself very confused.

Do document your code. We have not covered this topic – yet – but for now, know that documentation means to leave little comments in blocks, or sections, of your code that lets you (or another coder in the future) know what you intended to do with a certain section of code. While Python is a very readable language, the way every programmer codes is different, and what might be apparent to you is not always apparent to others. Also, if you have to review your own code at a later date, it will make it easier for you to remember what, exactly, you were trying to do at 4 a.m. 10 years ago!

Do plan out your code. That is, write down how you want your overall program to work and then break that down into little sections. Then, take those little sections and map out what you need to code for each part. This way you will have a roadmap to follow and won’t just be coding by the seat of your pants.

Finally, do test your code frequently and save your work often. When we programmers are in the thick of things, we like to carry on, plugging away, for hours at a time. However, if we don’t stop to test our code and save our iles, we risk losing hours of work and, worse, creating a program with problems that are dificult to trace.

Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub (github.com/apress). For more detailed information, please visit https://www.apress.com/gp/services/source-code.

Acknowledgments

This book wouldn’t have been possible without Todd Green, who reached out to me to write a book and listened to my ideas and, thankfully, chose the one I wanted to write the most.

Celestin Suresh reached back out to me and had me write this second version, for which I am eternally grateful.

James Markham and Andrea Gavana found all of my errors and proved to me that, even at this old age, I still have a lot to learn. Who knew – an old dog can learn new tricks.

Thank you to the entire editorial team at Apress, who were a pleasure to work with and helped me do what I love to do most: write. And make up stupid comic book characters.

Table of Contents

Chapter 1: Introduction to Computer Programming and Python

Programming Language Overview

Python Overview

How Does Python Differ from Other Programming Languages?

The Beneits of Python

Examples of Python in the Wild

Your First Python Program

Installing Python

Installing Python on Windows

Installing Python on Other Operating Systems

In This Episode!

Chapter 2: It All Adds Up

Operator Precedence

Data Types: Know Your Enemy

Converting Number Data Types

What Are Variables?

Superhero Generator 3000

In This Episode!

Chapter 3: Stringing Things Along

Leave Your Comments at the Door

Block Commenting

Inline Commenting

Other Uses for Commenting

Texting – Without Your Phone

Working with Strings and Variables

Longer Strings

Strings on Multiple Lines

Formatting Strings

Introducing a New Weapon to Your Arsenal: Lists

Changing Lists

Other List Methods

In This Episode!

Chapter 4: Making Decisions

Making Decisions

Conditional Statements

Behold – The If Statement!

Boolean Logic and Comparison Operators

Else Statements

Else-If Statements

Logical Operators

Nesting – Not Just for the Birds

In This Episode!

Chapter 5: Loops and Logic

What Are Loops?

Limiting Loops

For Loops

More Fun with For Loops

Break, Continue, and Pass Statements

In This Episode!

Chapter 6: Using What We’ve Learned

Creating Your First Real Program

Importing Modules

Creating Our Variables

Deining Our Lists

Introductory Text and Accepting Input from the User

Creating Suspense!

Randomizing Superhero Names

A Quick Check-In

Randomizing the Superpowers

Finishing Our Program

The SuperheroGenerator3000 Code – Completed!

Chapter 7: Saving Time with Functions, Modules, and Built-Ins

Deining Modules

Built-Ins

Packages

Creating Your Own Module

Common Built-In Functions

String Functions

Practice Your New Functions

String Function Examples

Number Function Examples

In This Episode!

Chapter 8: Using Classes and Objects

What Is OOP?

What Are Classes (And Will I Be Graded?)

What Are Objects

Creating Our First Class

Creating Our First Object

Improving the Superhero Generator 3000!

Inheritance, Subclasses, and More!

Adding the Bells and Whistles

The New and Improved Superhero Generator 3000 Code!

In This Episode!

Chapter 9: Introducing Other Data Structures

More Data Structures

What Are Tuples?

The Tuple Functions

More Fun with Tuples

Tuple Examples

Working with Dictionaries

Dictionary Methods

More Fun with Dictionaries

Other Dictionary Methods

Example Dictionary Code

In This Episode!

Chapter 10: Python Files

Working with Files in Python

File Types

Creating a Text File in Python Code

Reading Files in Python

A Warning About Reading and Writing to Files

Appending to Files

Working with Directories

Bonus Round!

FunWithFiles.py Code

WorkingWithDirectories.py

In This Episode!

Chapter 11: Python for Gaming

Python for Gaming

Types of Games You Can Code in Python

Pygame Introduction

Installing Pygame

Setting Up the Pygame Bare Bones for a Game

Adding to Our Game Skeleton

Adding Images and Sprites in Pygame

Adding Text to Our Pygame Game Window

Drawing Shapes in Pygame

Adding More Events

In This Episode

Chapter 12: Animating Games

Creating Animations in Pygame

Collision Detection: Bouncing Off the Walls

Collision Detection: Detecting the Window Boundaries

Colliding Two Objects

In This Episode!

Chapter 13: Error Handling

Finding Errors

Types of Errors

Syntax Errors

Logical Errors

Exceptions

The Try Except Else Block

Using Finally

Creating Custom Exceptions

Logging

Debugging Tools in Python

One Final Tip for Handling Errors

In This Episode!

Chapter 14: Python Career

Working with Python

Career Paths for Python

Beta Tester

Code Debugger/Bug Locator

Data Scientists

Software Developer/Software Engineer

Video Game Programmer

Mobile Development

Web Development and Web Applications

System Administration

Research, Teaching, and More

Common Python Interview Questions

Can You Tell Me Some of the Key Features of Python?

What Is the Difference Between a Tuple and a List

What Is Inheritance?

How Do You Generate Random Values in Python?

How Do You Create a List, Tuple, and Dictionary in Python?

What Is the Difference Between a Local Variable and a Global Variable?

What Are the Different Data Types Python Offers?

What Is a GUI? What Python Library Is Best for GUI Development?

How Do You Open a File in Python?

How Would You List the Functions of a Module?

Other Python Interview Questions

Best Programming Practices

Follow Style Guides

If It’s Broken, Fix It (Now, Not Later)

Documentation Is Everything

Use Code Repositories and Packages

Test Often

Choose a Side: Indentation or Spaces

Classes Are Great, But Not Everything Needs to Be One

The Future of Python

Python Terms

Index

About the Author

James R. Payne was introduced to programming when he was just ten years old. He started off hacking text-based games like Lemonade Stand to gain an advantage while playing and soon started creating his own textbased role-playing games in the style of Dungeons & Dragons and inspired by his favorite comic books. The enjoyment of those early days stuck with him, and he continues to be drawn back into the programming world throughout his career.

Payne is the former Editor-inChief/Community Manager of Developer Shed, an online publication and community consisting of 14 websites and forums dedicated to programming, web development, and Internet marketing. He is presently the editor for the developer sites at TechnologyAdvice. He’s written over a thousand articles on coding and marketing, covering virtually every language and platform available. His irst book, Beginning Python (Wrox Press), was published in 2010. In addition, he has published over 3000 articles covering topics ranging from gaming to aerospace/aeronautics, and he also writes adult horror and young adult fantasy books.

Payne decided to write this book to pass on his love of development in the hopes that it would inspire future generations to code.

© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024

J R Payne, Python for Teenagers

https://doi org/10 1007/978-1-4842-9988-3 1

1. Introduction to Computer Programming and Python

(1)

R. Payne1

Gainesville, GA, USA

Computer programming – commonly referred to as “coding” by the cool kids – is the art of creating applications or software. These programs allow us to do everything from solving simple math problems and watching our favorite TikTok videos (I can’t get enough of skydiving bulldogs) to destroying hordes of rampant aliens in our favorite video games and even launching a real-life spaceship into outer space.

I call computer programming an “art” because it is. Anytime you create something, you are indulging in an art form. Sure, computer code, the words we type into a shell to create our programs (more on this later!), may not be pretty to look at for the common person on the street – your code will never see the inside of an art exhibit most likely – but when a part of your program does what you created it to, there is almost nothing more magical.

Well, maybe those skydiving bulldogs.

A computer program can come in many shapes and sizes. In addition to an application that runs on your desktop system or a game that plays on your go-to video game console, programs also take the form of mobile apps on a cell phone. You can even ind pieces of software that operate things like refrigerators, your mom’s minivan, and even something as simple as a toaster oven.

And robots. Armies of robots.

But more on that later.

For now, know that a computer program is a set of code, created in a programming language, that tells a device to carry out a set of instructions.

Programming Language Overview

As mentioned, a computer program is written using a programming language. Just like the real language you, I, and the rest of the world speak every day, computer languages come in all shapes and sizes. While most of them make sense to the trained eye, a newcomer to code would sound like a crazy person spouting gibberish if they tried to use it in everyday conversation. That dialogue might look something like this:

Normal person: Hello, how are you?

Programmer (you): Print I am fine! Input, how are you?

Fortunately for all involved, computers are luent in programming languages (thanks, in part, to our friend the compiler – but more on this later!) and can easily understand the most complex of sentences you type in.

For the purpose of this book, we will stick to one of the most versatile, yet easy-to-learn, languages, Python. While the name sounds frightening, keep in mind, it could be worse: it could be called Cobra. In truth, the language was not named after a reptile at all, but, instead, an old television comedy from Britain called Monty Python and the Flying Circus.

Here’s your irst assignment: Go ask your parents about that show. See you in a few hours!

Oh, you are back. Great. Did what they said make any sense? Probably not. But that’s okay; you don’t need to understand the complexities of British comedy to learn how to program using this book. All you need is a desire to learn, a computer, and the pages in front of you.

Python is what is known as a high-level, dynamic, interpreted, objectoriented programming language. While all of that may sound a bit intimidating, never fear! By the end of this book, you will be able to impress your friends with sentences much more daunting than the one above! All that statement really means is that Python is not a basic machine-level language, and as such, it needs an “interpreter” to “compile” it to machine language so that the computer can understand what it is you are trying to tell it.

This interpreter takes your code and converts it – or compiles it –into a series of 1s and 0s that a computer can plainly understand. All of that happens in the background, so don’t worry if you do not quite understand it just yet.

Python is a relatively new programming language that was created in the late 1980s – back when your dad had a big funny mustache and your mom listened to bands with names like Wham! and Poison.

The man that created the language was a computer genius named Guido Van Rossum, who was bestowed with the fancy, nonsensical title, Benevolent Dictator for Life. Like technology, programming languages evolve as well, and Python is no different. It has gone through several versions over the years and is currently known as Python 3. More speciically, the latest release is 3.11.4, with 3.12 in beta (or test mode).

The numbers following the decimal – the 11.4 – represent updates to the programming language. Prior to 3.11.4, there was version 3.11.3, and so on.

How Does Python Differ from Other Programming Languages?

Python differs from other programming languages in a number of different – yet important – ways. For starters, Python is typically easier to learn and use than languages in the same class, such as Java and C++. Programs created in Python also take less time to create, as it requires less code (in general). This is due, in part, to Python’s data types – a term we will cover in great detail in an upcoming chapter.

Python is also extremely versatile. While it may not be the primary choice, Python can be used for applications in virtually every arena, including gaming, desktop software, mobile apps, and even virtual

reality. It is also a must for network programming and an essential tool in a computer security toolbox.

The Beneits of Python

Python is currently the most-used programming language in the world today and is the fastest growing as well. And with good reason. Below are just a few ways in which Python can beneit a programmer:

Increased productivity: By some reports, Python can increase a programmer’s productivity – how much work they can accomplish in a given time – by as much as ten times! It literally is faster than a speeding bullet!

Extensibility: One great advantage of Python is the fact that it has a very extensive library or, well, libraries. A library is a set of existing code you can add-in to your program. These libraries cover things that are common features of a program and save you from having to write the code over and over again yourself. For example, instead of having to write a section of code to perform a complicated mathematical equation, you can simply use a library and save yourself a huge headache.

Python is easy to read: One tough part of being a programmer is the fact that, sometimes, your code does not work. When that happens, you might ind yourself re-reading your code – or worse, someone else’s – to try and igure out why your program is not behaving as it should. Fortunately, Python is easy to read, and most of the language makes sense at a glimpse. This makes inding issues a lot easier than more complicated languages.

Portability: Python runs on many platforms and systems, meaning your programs can reach a wider audience.

Internet of Things (IoT): The Internet of Things may sound like a magical world full of digital beasts, and in some ways, it is. The IoT consists of smart objects – light switches, doorknobs, toaster ovens, appliances – that you ind in your everyday home. These household appliances are controllable by voice commands and mobile devices, making them more interactive than their primitive predecessors. I mean sure, your mom and dad yelled at the dishwasher all the time –

but did it ever listen? Now, thanks to the IoT and languages like Python, it can! You still have to put your dishes inside of it, but still! Python frameworks: Frameworks are like skeletons for a program –they allow you to quickly set up the basics for certain types of applications without needing to code common elements that usually exist in the type of software you are developing. This saves programmers time and reduces the number of errors that can occur when you have to manually code. Python is supported by a large number of frameworks that can make launching a new program very rapid indeed!

Python is fun: Python is a fun language to learn; as stated, not only is it easy to get started, but the Python community hosts many fun events and challenges. For example, many people write their Python code in poetry form, and there are numerous Python “challenges” released every year to help test a coder’s skills.

Python is lexible: Because Python has so many uses and is used by so many companies around the world, inding a job after learning Python is easier than with other languages. In addition, if you do not like a given ield, you can always use your Python skills to try a different path. For example, if you ind that coding applications is boring, you could switch to network administration or work at an IT security irm.

And those are just a few of the beneits and advantages that Python offers.

Examples of Python in the Wild

While it is impossible to say just how many companies around the world use Python, there are a number of interesting businesses that rely on the language. Below is just a smattering of them: Wayne Enterprises (Batman’s Alter Ego’s corporation): Well, we don’t really know that, but wouldn’t that be cool!

Google: The search engine giant and one day ruler of the galaxy, Google, has been using Python since its inception, partially because developers can build programs so quickly with it and also because the code is easy to maintain.

Facebook and Instagram: While Python is not the only language used at these two social media platforms, it is one of their most important ones. Facebook uses Python, in part, thanks to its extensive libraries. Instagram, meanwhile, is a irm supporter of one of Python’s main web frameworks – Django. We cover web frameworks in great detail later in this book.

Netlix: If you are a fan of streaming movies, then you are no stranger to Netlix. The company uses Python primarily for its data-analysis capabilities and for security purposes – among other areas.

Video games: Battleield 2 and Civilization 4 are just two video games that both rely on Python. Interestingly enough, Civilization uses Python for, among other things, its artiicial intelligence (AI) scripts. Government agencies and institutions: Government agencies and institutions including NASA, The National Weather Service, and the CIA all use Python – though how it is used is Top Secret! Meet us in the garage with a briefcase full of money, and we’ll tell you all about it!

Your First Python Program

By now, you are probably wondering what Python code looks like. Well, fear not! I am going to show you a sample snippet. Later, after we install Python and an IDLE (integrated development environment) on your computer, you can try and execute – or run – the code to see it in action. For now, though, I thought it would be a good idea to just give you a taste before delving any further into the language.

Traditionally, when a programmer writes their irst ever line of code, they create a program called, “Hello, World,” as a metaphorical way to introduce themselves to the world. However, as budding superheroes – or villains (no judgment here) – we need something a little lashier.

Behold, your irst Python program!

print("Look up in the sky! Is it a bird? Is it a plane?")

print("Dun dun dun dun dun dun dun dun dun dun dun dun dun dun dun dun")

print("No you dummy. That's just some guy flying around in his pajamas. Now get back to work!")

If you were to run this code, the result would be:

Look up in the sky! Is it a bird? Is it a plane? Dun dun dun dun dun dun dun dun dun dun dun dun dun dun dun dun No you dummy. That's some guy flying around in his pajamas. Now get back to work!

Let’s examine the code a little more closely. The part that says print() is known as a function, whose job it is to tell the computer to – in this case – print something to the user’s screen. The text in between the opening and closing parentheses () is the parameter that we are providing the function. The characters in between the quotation marks “ ” are known as a string.

Don’t worry if this doesn’t make all the sense in the world just yet –we go over this topic in great detail in the next chapter. For now, just know that this is what Python code looks like. Odds are, you were able to tell exactly what this program would do before I told you; that is just one of the things that make Python so great – its readability!

Installing Python

In this section, we are going to learn how to install Python on the various operating systems. An operating system is a piece of software that lets you interact with a computer. You are probably familiar with the more popular ones, such as Microsoft Windows (if you own a PC) and macOS if you own an Apple computer. The version of Python you install will vary depending upon which one of these your computer uses. In addition, we will learn how to install Python on Linux and Ubuntu systems as well.

Installing Python on Windows

To begin, open up a web browser, and navigate to the oficial Python website and its download page: www.python.org/downloads/ (Figure 1-1).

The current version of Python is 3.11.4; by the time you read this book, it may be higher than that. Whatever the case, click the “Download Python” button under the Download the Latest Version for Windows header. Optionally, you could scroll down and download previous versions (just make sure they are version 3.X or higher, as there are incompatibility issues between versions 2.X and 3.X); however, for the purposes of this book, it is always best to use version 3.11.4 or later.

Depending upon your system settings, an image may appear asking if you would like to save the ile. If so, click “Save File,” and save it to your Desktop or somewhere easily remembered.

Navigate to your Desktop or Downloads folder (or the location where you saved the ile), and double-click it. It should appear similar to the image in Figure 1-2.

The installer will launch and will ask you whether you wish to “Install Now” or “Customize Installation.” For ease, we are going to

Figure 1-1 Python.org website
Figure 1-2 Python .EXE install ile icon

Another random document with no related content on Scribd:

l’exigeraient. C’est d’après cette idée simple que nous vous proposerons de décréter que la Convention charge une commission, composée de cinq de ses membres, adjoints au comité de salut public, de lui présenter dans le plus court délai, un plan de constitution, réduit aux seuls article qu’il importe de rendre irrévocables par les assemblées législatives, pour assurer à la République son unité, son indivisibilité et sa liberté, et au peuple l’exercice de tous ses droits.

Reprenons donc avec constance le travail de la constitution, et discutons-en le petit nombre d’articles vraiment constitutionals, avec cette sagesse qui n’exclut pas l’énergie, et avec ce talent qui ne flétrisse pas les défiances.

Songez que le dernier article de la constitution sera le commencement du traité de paix avec les puissances. Il leur tarde de savoir avec qui elles peuvent traiter, quelle que soit la forme de notre gouvernement....

There follows a strong attack upon the Federal idea, showing the Committee to be definitely anti-Girondin in its sociology.

Mais cette inscription sera-t-elle donc toujours mensongère? verra-t-on sans cesse, dans le palais de l’unité, les fureurs de la discorde, et 44 mille petites républiques y agitant leurs dissensions par des représentans?...

Il faut qu’à votre voix, tous les Français se prononcent, que l’égoïste et l’avare soient flétris par l’opinion, et punis dans leurs richesses. Ne vous y méprenez pas, il n’y a plus de gloire et de bonheur pour vous, que dans le succès de la liberté, dans le rétablissement de l’ordre, et dans l’affermissement des propriétés.

Voilà la base de toutes les sociétés politiques, et le législateur qui la méconnaîtra, sera en horreur à ses contemporains et à la postérité.

Il sera aussi exécré le législateur qui aura méconnu les droits du peuple, et qui n’aura pas écouté la plainte des malheureux.

Si vous perdez cette occasion d’établir la république, vous êtes tous également flétris, et pas un de vous n’échappera aux tyrans victorieux, quelle que soit la nuance de votre opinion ou le principe de vos actions. Le glaive exterminateur frappera les appelans au peuple, et les votans pour la mort du tyran; et c’est la seule égalité que vous aurez fondée. Vos noms ne passeront à la postérité que comme ceux des rebelles et des coupables: vous aurez reculé le perfectionnement des sociétés humaines; vous aurez perdu les droits des peuples, vous aurez fait périr 300 mille hommes, et dilapidé des trésors que la liberté avait déposés dans vos mains pour son affermissement; vous aurez rétrograder la raison publique; vous serez complice de la tyrannie des rois et de la barbarie de l’Europe, et l’on dira de vous; la convention de France pouvait donner la liberté à l’Europe, mais par ses dissensions, elle riva les fers du peuple, et servit le despotisme par ses haines....

FOOTNOTES

[1] C. W. Oman, “History of England,” p. 581.

[2] Taine, “La Révolution,” preface

[3] Victor Hugo, “Quatre-vingt-treize.” Illustrated edition of 1877. Paris, pp. 136-150.

[4] E g he says the “gentry” of France should imitate the gentry of England But to do this it is necessary to own the houses of the peasantry; and even then the system does not always suit the Celtic temperament, they say.

[5] For example, the island of Serque.

[6] Bonaparte may have had a noble ancestry. But so had more than one true bourgeois whose family had had neither the means nor the desire to insist upon the privileged rank in the past.

[7] For the sake of clearness I do not mention the large class who had purchased fiefs, all technically noble, many practically bourgeois

[8] Lyons was, of course, a frontier town of the empire, but locally it is the centre of its own country the “Lyonnais.”

[9] All biographers agree The first publication of the extract from the civil register was obtained by Bougeart in August 1860 It was furnished to him by M Ludot, the mayor at the time There is a ridiculous error in the Journal de la Montagne, vol. ii. No. 142, “né à Orchie sur Aube.”

[10] The date is given in the extract mentioned in the preceding note

[11] See the action of the relatives in No. VI. of the Appendix.

[12] Bougeart, p 12 A Danton, who was presumably the son of this brother, was an inspector of the University under the second Empire

[13] See Appendix No. V.; also Théâtre de l’Ancien Collège de Troyes, Babeau, published by Dufour-Bouquet, Troyes, 1881.

[14] See list of his library, Appendix VIII., and his interview with Thomas Payne, at the beginning of Chapter VII.

[15] Speech of August 13, 1793. Printed in Moniteur of August 15.

[16] M Béon

[17] Danton, Homme d’État, p. 29.

[18] See “Notes of Courtois de l’Aube” in Clarétie’s “Desmoulins ”

[19] Danton, Homme d’État, p. 30.

[20] An excellent reading is afforded by the Avocat aux Conseils du Roi of M Bos (Machal & Billaud, Paris, 1881), quoted more than once in this work

[21] Since 1728 membership of this body had been purchasable and hereditary; a striking example of how wrongly society was moving.

[22] See Appendix VI

[23] M. Bos, quoted above.

[24] Ibid , p 520

[25] See Appendix V.

[26] See Appendix II on Danton’s lodgings in Paris

[27] See Robinet, Danton vie Privée, p. 284.

[28] See Appendix VI

[29] By nature his nose was small. His was one of those faces rarely seen, and always associated with energy and with leadership, whose great foreheads overhang a face that would be small, were it not redeemed by the square jaw and the mouth Thus Arnault, “une caricature de Socrate ”

[30] I refer to the English reformer who, on taking ship at Bristol, cast his perruque into the water, crying, “I have done with such baubles,” and sailed bald to the New World.

[31] See Appendix VIII

[32] See Appendix IX.

[33] From the Almanack Royal of 1788 Dr Robinet, whose opportunities of information are unique, tells us that he first moved into the Rue des Fossés St Germains, and later into the

Cour du Commerce, some time in 1790. The statement as to the first direction is unaccompanied by any authority, but Dr. Robinet possesses a letter with this address on it; now here the definite information of an official list seems to me of the greatest weight

[34] See Appendices II. and VII. Some rooms look on the Rue des Cordeliers, some on the Cour du Commerce.

[35] De Barentin See preceding chapter and Appendix V He became Danton’s client just before the decree that summoned the States-General

[36] Sécretaire du Sceau.

[37] See Appendix V , Rousselin The anecdote is little esteemed by Aulard, but is admitted to be of value by other biographers Aulard relies for his opinion upon the undoubted errors in the matter of date. But Rousselin may have been right in the main, though (writing many years after) mistaken in the matter of a month or so.

[38] E Champion, La France en 1789 Esprit des Cahiers in La Révolution (Hist Générale, viii )

[39] Ibid.

[40] Aulard, who quotes Chassin, Les Elections de Paris, vol ii p 478 M Aulard tells us that M Chassin saw the document himself before the war

[41] Less than six hundred.

[42] Appendix V

[43] This description is taken from a contemporary water-colour sketch which I have seen in the collection of Dr. Robinet.

[44] See Appendix I

[45] See the discussion of the somewhat meagre authorities in Robinet, Danton, Homme d’État, pp. 37-40.

[46] Documents authentiques pour servir à l’Histoire de la Révolution Française Danton, par Alfred Bougeart. Brussels, 1861 (La Croix, Van Meenen & Cie.).

[47] Aulard, who quotes Charavay, Assemblée electorale de Paris

[48] Chassin, Les Elections et les Cahiers de Paris, iii. 580-581, on which this whole scene is based.

[49] Aulard, Revue de la Révolution Française, February 14, 1893.

[50] See the figures given in the petition against Danton’s arrest, p. 108.

[51] This decree was passed by the Cordeliers on Tuesday, July 21, 1789 It is not so unreasonable as it might seem, for but two days afterwards (July 23rd) the informal municipal body recognises the necessity of new city elections

[52] Signed 21st September; promulgated 3rd November.

[53] An excellent example is on p 45 of Danton, Homme d’État

[54] Their names were Peyrilhe, De Blois, De Granville, Dupré, Croharé. They can be found, with all the decrees touching this business, in Danton, Homme d’État (Robinet, 1889), p. 248. Printed, like all the Cordeliers’ decrees, by Momoro in the Rue de la Harpe, and signed, “d’Anton.”

[55] It may be remembered that Bougeart (p. 69) claims the presidency for Danton at the very beginning of ’89. The error of this has been pointed out. On the other hand, Aulard says he was not President till October. This is another error. There is at least one earlier document, that of September, quoted on the preceding page.

[56] They had sat for a while at the Evéché; on the Island of the Cité, while the Manège was being prepared

[57] Rev. de Paris, xxiii. p. 20.

[58] November 11th and 12th

[59] 22nd of December.

[60] 12th November and 14th of December

[61] 31 against 20 (Aulard, from Journal de la Cour et de la Ville, p. 518).

[62] Danton, Homme d’État, pp 256, &c Signed, “d’Anton ”

[63] Danton, his friend Legendre, Testulat, Sableé, and Guintin. Several authorities have placed Danton’s election in September 1789 instead of January 1790, an error due (probably) to following Godard’s list, which was published in 1790, but bore the title, “Members of the Commune elected since September 1789 ”

[64] Marat’s presses were hidden in a cellar of the Cordeliers now situated under the house of the concierge of the Clinique.

[65] January 19th.

[66] The Rue des Fossés was (and is, under its new name) remarkably straight for an old street Cannon could be used

[67] Their names were Ozanne and Damien; the same Damien, I believe, who committed the blunder of September 13, 1791. See p. 150.

[68] Article 9 of the decree of October 8 and 9, 1790

[69] “Notables-adjoints,” to the number of seven in each district. Danton himself was elected on to such a body in May or June 1790, and served for a few months.

[70] That is, till his election as substitute to the Procureur in December 1791

[71] January 25, 28; February 4, 16; March 3, 5, 13, 19; June 15, 19, 23. Aulard, Rev. Française, February 14, 1893, pp. 142, 143.

[72] It is this warrant which has probably misled one biographer as to the date of the “Affaire Marat.” (Danton, Homme d’État, p. 67: “En mars survint l’affaire Marat.”)

[73] That is, of course, the inclusion of Paris into the general scheme of December 1789 a scheme that enfranchised the peasants, but created an oligarchy in the towns See above, pp 21, 22, and 93

[74] He received 12,550 votes, the great bulk of the limited suffrage. Forty-nine odd votes were cast for Danton, but he was obviously not a candidate (Aulard).

[75] Ami du Peuple, No 192

[76] Révolutions de France et Brabant, tom. x. p. 171.

[77] There is a misprint (a very rare thing with this careful historian) in footnote No. 3, p. 231, of M. Aulard’s article on Danton in the Rev. Française for March 14, 1893. For “November” we should read “September,” for we know that the voting was over on September 16. See Robiquet, Personnel Municipal, p. 373, and the evidence on all sides that a new poll was ordered on September 17 in his Section.

[78] This big building in the island next Notre Dame disappeared in the restorations of Viollet le Duc. It was often used in the revolutionary period for public meetings, and even the Assembly sat there for a few days after entering Paris in October, and while the Riding-School was being prepared for it

[79] Moniteur, Old Series, No. 316 (1790).

[80] M Aulard says “somewhere between the 10th and the 15th,” and “nous n’avons pas la date precise ” He has probably overlooked L’Ami du Peuple, No 290, “Le 14 de ce mois Danton a été nommé à la place du Sieur Villette ”

[81] Aulard. The other biographers all assume that he did not resign.

[82] Orateur du Peuple, vol iii No 24

[83] Ibid., vol. vi. No. 27.

[84] The letter will be found in M Etienne Charavay’s Assemblée Electorale, p. 437.

[85] I quote from M. Aulard, Rev. Française, March 14, 1893.

[86] Note that Lafayette in his Memoirs (vol. iii. p. 64) talks of Danton “at the head of his battalion.” I doubt an error on the part of a soldier whose business it was to know his own command.

[87] e g that of the quarter of the Carmelites (ibid )

[88] Révolutions de France et Brabant, No. 74.

[89] See his Collected Works, vol xii pp 264, 265

[90] M. Aulard points out an error in Condorcet’s own note (xii. p. 267), where it is mentioned as the 12th of July; but the Bouche de Fer of the 10th gives us the above date over these two speeches.

[91] He wrote a funny little letter (among other things) to the Républicain of July 16, describing a “mechanical king,” “who is practically eternal ”

[92] See Société des Jacobins, vol. ii. p. 541.

[93] Moniteur, July 16, 1791

[94] Ami du Peuple, June 22, 1791.

[95] Révolutions de France et de Brabant, No. 82.

[96] This is not a rhetorical exaggeration. It indicates, as will be seen later in the chapter, the very number that finally formed the garrison of the palace a point not hitherto noticed, and well worth remembering, for it shows how Lafayette’s accusations are half the truth He had approached Danton, and he had told him many of his plans Danton had not acceded, but he used the knowledge

[97] Révolutions de France et de Brabant, No. 82.

[98] Appendix II

[99] On June 24.

[100] I follow Aulard in this as to the general scheme, and largely as to authorities also

[101] Aulard is my authority for the fact that the actual text of this second petition disappeared in 1871, when the Hotel de Ville was burnt by the Commune, but that Berchez saw it before that event, and carefully drew up a list of the principal names Danton is not among them

[102] The Courrier Français of July 22 asks if “the man in holland trousers and a grey waistcoat was Danton,” but says nothing more.

[103] See the letter published in the Rev Française, April 1893, p 325

[104] Orateur du Peuple, viii. No. 16. Not over-trustworthy.

[105] Possibly later Beugnot seems to speak as though Danton was still in Troyes on at least as late a date as the 6th of August (Mémoires, i pp 249-250)

[106] Since writing the above I notice that M. Aulard in the same article quotes a remark of Danton’s in the Electoral Assembly of September 10th. This is taken from the procès verbal of the Assembly, and M Charavay communicated it to M Aulard

[107] His election was not declared till the 7th, but was known on the 6th.

[108] January 20, 1792

[109] I see in that phrase all Danton’s attitude upon the war.

[110] There was a minority of seven

[111] Perhaps as early as the evening of the 28th.

[112] This account is translated from the Moniteur, August 3, 1792.

[113] Journal des Débats, 183.

[114] I take this document from Robinet, Danton, Homme d’État, pp 109, 112; but neither he nor Aulard (who quotes it) gives the authority The circular is quoted often under the date of August 19; it was issued on that Sunday, but was drawn up and dated on the Saturday to which I have assigned it

[115] Aulard, who quotes from the Moniteur, xii. 445.

[116] The scene can be reconstructed from his testimony at the trial of the Girondins and from his speech at the Jacobins on the 5th of November

[117] I take all this from Aulard’s article in the Révolution Française of June 14, 1893.

[118] The votes of the 30th, 31st, and 2nd

[119] The word “illegally” is just, for the constitution of the Commune and all its acts were legally dependent on the Assembly. On the other hand, the Commune had given this committee right to add to its numbers, but such men as Marat, who was not a member of the Commune, were surely not intended

[120] First La Poissonnière, then the Postes and the Luxembourg.

[121] It is possible that this sentence, including the preceding phrase, “le tocsin qui va sonner,” &c , are the only part of the speech that has been literally reported The Logotachygraphe was not founded till January, and while the Moniteur and the Journal des Débats give much the same version, the latter calls it a “summary.”

[122] “Appel à l’impartiale posterité ” Madame Roland had the great historical gift of intuition, that is, she could minutely describe events which never took place I attach no kind of importance to the passage immediately preceding If Danton and Pétion were alone, as she describes them, her picture is the picture of a novelist The phrase quoted above may be authentic—there were witnesses.

[123] Moniteur, January 25, 1793. Speech of January 21st.

[124] Speech of January 21, 1793.

[125] The accusations against Danton in this matter are given and criticised in Appendix IV., where the reasons are also given for omitting any mention of Marat’s circular in the text

[126] For the figures and very interesting details as to Egalité’s election see Révolution Française August 14, 1893, second note, page 129.

[127] More than 700 and less than 1000 died The common exaggeration is Peltier’s 12,000

[128] As a fact, his successor, Garat, was not elected till the 9th of October, and did not begin to act till the 12th. Danton seems to have remained at the Ministry till the evening of the 11th.

[129] October 23

[130] Michelet, 1st edition, vol. iv. pp. 392-394.

[131] October 10 and 11

[132] He made a speech on the 6th of November demanding (of course) the trial of the King, but not with violence. He left for Belgium with Delacroix on the 1st of December.

[133] This Dannon was a friend of Danton’s. He began, but did not complete, a collection of his speeches, &c., and an inquiry into his accounts. He was a member for Pas de Calais. It is not easy to get his name accurately spelt. I follow the spelling of a list of the Convention published in 1794. Dannon voted for banishment.

[134] I must not omit to mention one phrase which is far more characteristic of him—that spoken after Lepelletier’s assassination: “It would be well for us if we could die like that ”

[135] The proofs of the connection with Talleyrand are based only on inference. They will be found discussed in Robinet’s Danton Emigré, pp. 12-16 and pp. 270, &c. As for Priestley’s correspondence, it was sympathetic and deep, and continued in spite of the massacres of September There is a draft of a Constitution in the French archives which some believe to be Priestley’s, but I am confident it is not in his handwriting

[136] Moniteur, March 9, 1793.

[137] Ibid March 10, 1793

[138] See Patriote Français, No. 1308.

[139] See Moniteur, March 13, 1793

[140] Paine’s ignorance of French was such that his speech on Louis’s exile was translated for him.

[141] La Roche du Maine.

[142] Levasseur tells us that Delmas spoke first, and that his remarks took the form of a definite motion for the appearance of the Committees to account for their action Legendre is mentioned here because he alone is agreed upon by all the eyewitnesses (and by the Moniteur) as being the principal defender of Danton We must not underestimate his courage; it was he who with a very small force shut the club of the Jacobins on the night of the 9th Thermidor, and so turned the flank of the Robespierrian faction.

[143] “Quand les restes de la faction ... ne seront plus ... vous n’aurez plus d’exemples à donner ... ils ne restera que le peuple et vous, et le gouvernement dont vous êtes le centre inviolable ”

[144] “Mauvais citoyen, tu as conspiré; faux ami, tu disais, il y a deux jours, du mal de Desmoulins que tu as perdu; méchant homme, tu as comparé l’opinion publique à une femme de mauvaise vie, tu as dit que l’honneur était ridicule ... si Fabre est innocent, si D’Orléans, si Dumouriez furent innocents tu l’est sans doute. J’en ai trop dit tu repondras à la justice.”

[145] Robespierre’s notes for St Just’s report were published by M. France in 1841 among the “Papiers trouvés chez Robespierre.”

[146] “La Convention Nationale après avoir entendu les rapports des Comités de Sureté générale et du Salut Public, décrète d’accusation Camille Desmoulins, Hérault, Danton, Phillippeaux Lacroix en conséquence elle declare leur mise en jugement ” These were the last words of St Just’s speech, and formed his substantive motion

“Ce décret est adopté à l’unanimité et au milieu des plus vifs applaudissements.” Moniteur, April 2, 1794 (13th Germinal, year II.).

[147] Couthon was a cripple. Once (later) in the Convention it was called out to him “Triumvir,” and he glanced at his legs and said, “How could I be a triumvir?” The logical connection between good legs and triumvirates was more apparent to himself than to those whom he caused to be guillotined.

[148] We have the fragments of this “No. VII.,” which was not published. See M. Clarétie’s C. Desmoulins, p. 274 of Mrs. Cashel Hoey’s translation

[149] Danton would have been thirty-five in October. Desmoulins had been thirty-four in March not thirty-three, as he said at the trial. I give this on the authority of M. Clarétie, who in his book quotes the birth-certificate, which he himself had seen (March 2, 1760).

[150] March 10, 1793 Exception has been taken to the whole sentiment by Dr Robinet, but great, or rather unique, as is his authority, I cannot believe that an appeal—especially an exclamatory appeal of this nature—was foreign to his impetuous and merciful temper.

[151] Wallon, Tribunal Révolutionnaire, vol. iii. p. 156.

[152] It is known that Fleuriot and Fouquier were alone when the jury were “chosen by lot.” This appeared at the trial of Fouquier. For the notes of Lebrun, see Appendix X.

[153] Wallon, Tribunal Révolutionnaire, vol iii p 155

[154] See Appendix X. The speeches which I have written here are reconstructed from these notes, and I must beg the reader to check the consecutive sentences of the text by reference to the disjointed notes printed in the Appendix.

[155] See p 199

[156] Wallon, Tribunal Révolutionnaire, iii. 169, quotes Archives, W. 342, Dossier 641, 1st Part, No. 34.

[157] Fouquier had written a letter to his distant relative Desmoulins, begging for some employment, on August 20, 1792, just after the success of Danton’s party, in which Desmoulins had of course shared. It is by no means dignified and almost servile. See Clarétie, Desmoulins, English edition, p. 318.

[158] This is M Wallon’s opinion, who gives both versions, and from whom I take so much of this description See Tribunal Révolutionnaire, iii 177

[159] All this appears in the trial of Fouquier.

[160] They are given in Clarétie’s Desmoulins in the Appendix

[161] See the list of the prisoner’s effects in Clarétie’s Desmoulins.

[162] This gate may be seen to-day just to the right of the great staircase in the court of the Palais de Justice. It has an iron grating before it

[163] The original of this I take from Clarétie, who quotes P. A. Lecomte, Memorial sur la Révolution Française.

“Lorsqu’arrivés au bords du Phlégéton

Camille Desmoulins, D’Eglantine et Danton, Payèrent pour passer ce fleuve redoutable Le nautonnier Charon (citoyen équitable)

A nos trois passagers voulait remettre en mains L’excédant de la taxe imposée aux humains.

‘Garde,’ lui dit Danton, ‘la somme toute entière; Je paye pour Couthon, St. Just et Robespierre.’”

[164] It was Madame Gély who told this to Despoi’s grandfather. Clarétie has mentioned it. But Michelet must have heard from the family about this same priest (Kerénavant le Breton), for according to Madame Gély it was he who married Danton for the second time

[165] Ce qu’il y a de certain d’après le résultat donné par la commission des subsistances militaires, c’est que les armées sont approvisionnées jusque vers le premier octobre; l’armée d’Italie, la plus mal approvisionnée, a des subsistances pour quelques mois, et l’on a déjà préparé pour elle d’autres approvisionnements.

[166] Des traîtres se sont mêlés dans les rangs des patriotes et dans les convois de l’artillerie qui allaient combattre les révoltés; le comité en a fait arrêter la marche, et le comité de surveillance retient les principaux auteurs de ce nouveau complot. Malgré tant de surveillance, quelques soldats français, indignes de ce nom, ont trahi leur devoir et sont allés grossir la horde des rebelles. Partout les obstacles se multiplient; partout les administrations veulent régler les mouvemens des troupes et les commissaires veulent faire les fonctions de généraux, des communes arrêtent à leur gré des armes qui ont une autre destination, et c’est ainsi que toutes les forces s’atténuent et que les brigands ont des succès

Mais du moins les rives qui correspondent aux perfides de George III. sont garanties. Les trois divisions commandées par le général Canclaux, qui occupent les ports intermédiaires entre les

Sables et Nantes, entretiennent la communication entre ces deux villes, et contiennent les brigands à une certaine distance des côtes

La communication par terre, entre Nantes et Angers, est libre, on travaille à rétablir la libre navigation de la Loire entre ces deux villes. Quelques bateaux armés de canons sont préparés, et suffiront pour cette protection.

Déjà une victoire signalée vient de raviver toutes les espérances de la patrie A Saint-Mexent, l’artillerie et les approvisionnemens des révoltés sont le prix de la première victoire signalée que les patriotes viennent de remporter

INDEX

Agriculture, depression of, before Revolution, 16.

Amelinau case, Danton’s opinion in, 51.

Antoinette, Marie, see “Marie Antoinette.”

Arcis-sur-Aube, Danton born at, in 1759, 40; position of, 40; effect on Danton’s politics, 42; visited by Danton in 1791, 148; again in August 1792, 166; last retirement of Danton to, 237.

Army, condition of, at Valmy, 192; Danton’s first mission to, 199; second mission, 204; third, 209; position of on Sambre in June 1793, 297; of “Sambre et Meuse,” 298; attitude towards Robespierre, 299, 300.

Arnault, witness of Danton’s death, 278.

Arrest of D’Eglantine, 246; of Hébert, 247; of Desmoulins and Danton, 248, 249.

Artisans, loss of influence of Church on, 21; their disfranchisement, 22; causes of their discontent, the guild, the octroi, 20; character of before Revolution, numbers, influence of, 19. Assembly, National, see “States General.”

Bailly, of the professional class, 24;

opposition of Cordeliers to, 82; elected mayor of Paris, 112; resignation of, 152.

Barbarian invasions of ninth century, 13.

Barentin, de, intimacy with Danton, 51, 60.

Barrère, a Bourgeois, 23; his action on first committee with Danton, 220; Report against Robespierre, 305, 306.

Bastille, fall of, 73-74; effect of this, 78-80.

Battles, of Valmy, 192, 193; of Jemappes, 196; Neerwinden, 208; Turcoing, 293; Fleurus, 298.

Belgium, Danton proposes annexation of, 204.

Bourgeoisie or middle class, effect of Revolution on, definition of, 22, 23; produces most of the revolutionaries, 23.

Brienne, de, client of Danton’s, 51.

Brissot, draws up petition of Jacobins, 146; attacked by Desmoulins, 226.

Brunswick, Duke of, his manifesto, 161-166; his hesitation, 177.

Burning at stake in United States, 5; by Parliament of Strasbourg in 1789, 5.

Cahiers, their nature, 62, 63; that of Cordeliers destroyed, 63.

Carnot, a Bourgeois, 23; in first Committee of Public Safety, 210;

Robespierre’s attack on, 304

Centralisation, of pre-revolutionary France, 10; quality of, 10; before Revolution, examples of, 16; pre-revolutionary fails to raise revenue, 26; used as a practical engine of reform, rapid raising of armies, 28.

Charlemagne, marks the end of settled Roman order, 12; Imperial tradition of in France, 15.

Charleroy, stronghold of Coburg, 297; captured, 298.

Charpentier, his Café des Écoles, 52; his daughter marries Danton, Mlle., see “Wife.”

Châtelet, impossibility of reforming it, 7; nature of, 98; issue warrant against Marat, 99; against Danton, 107.

Church, its loss of power in villages during eighteenth century, 17; loss of influence over citizens, 21; not main cause of egalitarian feeling in France, 32; intention of making Danton a priest in, 44.

Cicé, de, Danton as orator of municipal deputation demands resignation of, 129, 131.

Civil constitution of clergy, see “Clergy.”

Class system, vigour of, before Revolution, 16.

Classes, social, five principal, before Revolution, 16

Clergy, Danton’s defence of, 198; civil constitution of, 118; its vast importance, 119, 120; its details, 121; passes the Assembly, 122;

Louis ratifies, 123

Coburg, his position on Sambre, 297; is defeated at Fleurus, 298

Collot d’Herbois, attacked by Danton in Jacobins, 136; beaten by Danton in election for Substitute Procureur, 152.

Committee of Public Safety, first, proposed by Isnard, Danton elected, 210; determines overthrow of Girondins, 223; Danton resigns from, 234; Robespierre elected on, 234; powerful force in winter of 1793, 240; determination to continue Terror in spite of Danton, 240; abandons Robespierre, 301.

Commune (before August 1792, see “Municipality”), insurrectionary of, August 1792, 161; increases in power, 172; Marat joins its “Comité de Surveillance,” 183; its quarrel with Gironde, 216-228; opposes committee in winter of 1793, 240; attacked by Danton, 243; captured by Robespierre, 293; attempts to save him and fails, 310-314.

Condorcet, of the professional class, 24; example of balance of two French tendencies, 27; demands Republic, 141, 142.

Conseils du Roi, Old Court of Appeals, nature of, 48; Danton enters at Bar of, 49.

Contrat social, written just after Danton’s birth, 41.

Convention, elections of Paris to, Danton elected to, 188; its parties, 189; its appearance on first meeting, 190; declares Republic, 191; debate on king’s death in, 201, 202; votes arrest of Girondins, 202;

Legendre defends Danton in, 253; St. Just attacks Danton in, 254, 255; subservience to Robespierre, 296; outlaws him, 307-310.

Cordeliers, district of, social character, 64; position of Convent Hall in, 65; meets after elections, importance of this, 69; petitions against Danton’s arrest, 108; merged in section of Théâtre Français, 112.

Cordeliers, club of, contrasted with Jacobins, 80; their numbers and character, 81; opposition to new municipality, 82; determine on independent use of their guard, 83; attack municipality again, 88, 89; create Mandat Imperatif, 89; manifesto to march on Versailles, 91; oppose Lafayette’s discipline in National Guard, 93; oath of their deputies, 94; victory of club over municipality, 96; campaign against restriction of suffrage, 110-113; Danton leaves them for Jacobins, 135; Republican declaration of, on king’s flight, 142; petition of, on king’s flight, not signed by Danton, 146.

Cordelier, Vieux, published by Desmoulins to protest against Terror, 244.

Court, relations of nobles to, 24; form party to influence king at Versailles, 85, 86; last stand in the Tuilleries, 167, 168.

Courts of Law, before Revolution, 48.

Couthon, a Bourgeois, 23; proposes law on worship of God, 290; supports Robespierre in committee, 303

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.