AutomateTheBoringStuff.Ch02 package

Submodules

AutomateTheBoringStuff.Ch02.P01_vampire module

Vampire

This program checks name and age.

AutomateTheBoringStuff.Ch02.P01_vampire.main()[source]

AutomateTheBoringStuff.Ch02.P02_vampire2 module

Vampire 2.0

This program checks name and age, but won’t work as planned.

AutomateTheBoringStuff.Ch02.P02_vampire2.main()[source]

AutomateTheBoringStuff.Ch02.P03_littleKid module

Little kid

This program checks name and age, but not as many ages.

AutomateTheBoringStuff.Ch02.P03_littleKid.main()[source]

AutomateTheBoringStuff.Ch02.P04_yourName module

Your name

This program forces you to type your name

AutomateTheBoringStuff.Ch02.P04_yourName.main()[source]

AutomateTheBoringStuff.Ch02.P05_infiniteloop module

Infinite loop

This program runs in an infinite loop (don’t run unless you know how to stop it!).

Note

  • CTRL-C usually works
AutomateTheBoringStuff.Ch02.P05_infiniteloop.main()[source]

AutomateTheBoringStuff.Ch02.P06_swordfish module

Swordfish

This program asks for a name and password.

AutomateTheBoringStuff.Ch02.P06_swordfish.main()[source]

AutomateTheBoringStuff.Ch02.P07_fiveTimes module

Five times

This program runs five times.

AutomateTheBoringStuff.Ch02.P07_fiveTimes.main()[source]

AutomateTheBoringStuff.Ch02.P08_busywork module

Busy work

This program adds numbers 0 to 100.

AutomateTheBoringStuff.Ch02.P08_busywork.main()[source]

AutomateTheBoringStuff.Ch02.P09_fiveTimes2 module

Five times 2.0

This program also runs five times, but using a while loop.

AutomateTheBoringStuff.Ch02.P09_fiveTimes2.main()[source]

AutomateTheBoringStuff.Ch02.P10_printRandom module

Print random

This program prints five random numbers using the random module.

AutomateTheBoringStuff.Ch02.P10_printRandom.main()[source]

AutomateTheBoringStuff.Ch02.P11_exitExample module

Exit example

This program terminates itself when told to using the sys module.

AutomateTheBoringStuff.Ch02.P11_exitExample.main()[source]

AutomateTheBoringStuff.Ch02.P12_yourName2 module

Your name 2.0

This program also forces you to type your name, but using a different way to exit the loop.

AutomateTheBoringStuff.Ch02.P12_yourName2.main()[source]

Module contents