article start exercise in library alphabetizingif the initial word is an article ("the"" ""an")then it is ignored when ordering entries write program completing this functionand then testing itdef startswitharticle(title)'''return true if the first word of title is "the""aor "an''be carefulif the title starts with "there"it does not start with an article what should you be testing foris number string exercise *in the later safe number input exercise (page )it will be important to know if string can be converted to the desired type of number explore that here save example isnumberstringstub py as isnumberstring py and complete it it contains headings and documentation strings for the functions in both parts of this exercise legal whole number string consists entirely of digits luckily strings have an isdigit methodwhich is true when nonempty string consists entirely of digitsso ' isdigit(returns trueand ' aisdigit(returns falseexactly corresponding to the situations when the string represents whole numberin both parts be sure to test carefully not only confirm that all appropriate strings return true also be sure to test that you return false for all sorts of bad strings recognizing an integer string is more involvedsince it can start with minus sign (or nothence the isdigit method is not enough by itself this part is the most straightforward if you have worked on the sections string indices (page and string slices (page an alternate approach works if you use the count method from object orientation (page )and some methods from this section complete the function isintstr complete the function isdecimalstrwhich introduces the possibility of decimal point (though decimal point is not requiredthe string methods mentioned in the previous part remain useful loops and tuples this section will discuss several improvements to the choosebutton py program from the last section that will turn it into example program choosebutton py first an introduction to tupleswhich we will use for the first time in this sectiona tuple is similar to list except that literal tuple is enclosed in parentheses rather than square bracketsand tuple is immutable in particular you cannot change the length or substitute elementsunlike list examples are ( ('yes''no'making tuple is another way to make several items into single object you can refer to individual parts with indexinglike with listsbut more common way is with multiple assignment silly simple exampletup ( (xytup print(xprints print(yprints now back to improving the choosebutton py programwhich has similar code repeating in several places imagine how much worse it would be if there were more colors to choose from and more parts to colorfirst consider the most egregious example more on flow of control