rawArticle = "Minimum wage since 1938 When the federal minimum wage first became law in 1938 it was 25 cents. Adjusted for inflation, that would be worth 4 today. Scroll over the chart to see historical minimum wage amounts, and their corresponding values in today's dollars. Walmart: Wage hikes are killing our profits Walmart stock plunges after Walrmart warns of disappointing sales and earnings. The company's recent decision to increase the minimum wage for employees is expected to lead to a decline in profits next year. 15 minimum wage? Berkeley shoots for 19 an hour Berkeley, Calif. likes to lead the way on progressive issues. And when it comes to raising the minimum wage, some in the city are now trying to take the fight one step farther. 134 Americans earned more than 50 million each last year Stocks to Invest In 2016 SUV Reviews Online MBA Degree Programs 7 Best Dividend Stocks Top Mutual Funds to Invest Amazing Luxury Cars of 2016 Top 10 Laptops Mortgage Refinance Rates" article = rawArticle.split() ################################ Helper functions ##################################################### #Input:word ; Output: True --> if the word is a number ; False if not def isNumber(word): return unicode(word).isnumeric() #Input:word ; Output: Number if the word is a number ; 0 if not def getNumber(word): if unicode(word).isnumeric(): return int(word) else: return "Not a number" print "test if haha is a number" print isNumber("haha") print "test if 54321 is a number" print isNumber("54321") print "test getNumber of haha" print getNumber("haha") print "test getNumber of 54321" print getNumber("54321") ################################ DEMO ################################################################# ''' count = 0 #iterate through every word in the article. we call it "for loop" for word in article: #increment count by 1 count = count + 1 #This is just for demo purpose, it's ok if you don't understand print "current word: %s, count is %s" % (word, count) #after the for loop print "total count= %s" %(count) ''' ################################ HERE STARTS THE COMPETITIONS!! #################################### ################################ Practice 1 ######################################################## ''' #Goal: Count how many words are there in the article. count = 0 for word in article: # there are 2 lines of code missing here print count ''' ################################ Practice 2 ######################################################## ''' #Goal: sum up all numbers in the article sum = 0 for word in article: # there are 2 lines of code missing here print sum ''' ################################ Practice 3 ######################################################## #Goal: print True if this article has word "money", otherwise print False #Hint: create a variable, for loop..., after for loop, print True/False