concept adjective in category python

appears as: djectives, adjectives, n adjective, djective
Tiny Python Projects: Learn coding and testing with puzzles and games

This is an excerpt from Manning's book Tiny Python Projects: Learn coding and testing with puzzles and games.

This exercise will show you how to randomly select one or more elements from lists of options. To explore randomness, we’ll create a program called abuse.py that will insult the user by randomly selecting adjectives and nouns to create slanderous epithets.

$ ./abuse.py -h
usage: abuse.py [-h] [-a adjectives] [-n insults] [-s seed]
 
Heap abuse
 
optional arguments:
  -h, --help            show this help message and exit
  -a adjectives, --adjectives adjectives
                        Number of adjectives (default: 2)
  -n insults, --number insults
                        Number of insults (default: 3)
  -s seed, --seed seed  Random seed (default: None)
Figure 9.1 The abuse.py program will accept options for the number of insults to create, the number of adjectives per insult, and a random seed value.