Category: Begin Python
-
The 12 Days of Christmas… or any countdown song
Loops are a big part of programming, because one of the benefits of programs is that they can automate repetitive tasks for humans. If we were to type out the complete lyrics to “The 12 Days of Christmas,” we would end up having to do a lot of typing! And it wouldn’t be fun typing—it…
-
Generating a random passphrase
Disclaimer I’m not going to go into all the politics of passwords. Users are always trying to balance security with convenience. The point of this tutorial is not to say “This is how you generate the best password.” It’s more like “If you want to generate a random passphrase, this is one way to do…
-
Making a Rock, Paper, Scissors game in Python
Before you code, figure out what you’re trying to do with the code A brief note on codeUsing comments in code Expanding shorthand logic Considering another approach No one right way to approach problems Let’s actually start writing some code Don’t trust user input Picking a choice at random Comparing values with if/elif/else Extra Credit…