- Code: Select all
user_numberofselections = re.findall(pattern4, user_delimiter)
user_numberofwinners = re.findall(pattern5, user_delimiter)
strikeratecalc = user_numberofselections/user_numberofwinners
print "Strike rate = ",strikeratecalc
Both user_numberofselections and user_numberofwinners return numbers.
I tested that they were indeed recognised as numbers by replacing strikeratecalc = user_numberofselections/user_numberofwinners with strikeratecalc = user_numberofselections*7and likewise foruser_numberofwinners. Both of which work.
Any ideas why i cant get this (what should be simple) division to work???