Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 11. Functions > Lines 1 - 4

Lines 1 - 4

Our code begins with the usual Unix start-up line, which, we repeat, will be harmlessly ignored on all non-Unix systems. What follows are three from-import statements which load string.lower() for case-insensitive input verification, random.randint() for choosing the arithmetic operands, random.choice() for picking the arithmetic operation, and all the arithmetic operations we need from the operator module.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial