<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
oh :S ok im sorry...i will change that then<BR>thanks<br> <BR><div><div id="SkyDrivePlaceholder"></div>> Date: Mon, 17 Sep 2012 18:19:50 -0400<br>> From: d@davea.name<br>> To: computer_dude15@hotmail.com<br>> CC: tutor@python.org<br>> Subject: Re: [Tutor] simple random string generator<br>> <br>> On 09/17/2012 05:40 PM, Matthew Dalrymple wrote:<br>> > <br>> > <br>> >>><br>> >>><br>> >><br>> >> Did you look for bugs before trying to time it?  For example, did you<br>> >> intend that it test the sizes from 10 thru 195 in steps of 5, or did you<br>> >> intend from 10 to 100, as you stated in your first post?<br>> >><br>> >> Would you care to add a docstring to those functions to indicate what<br>> >> they're intended to do?  i think maybe the anagramSolutionX functions<br>> >> are supposed to return True if the two strings contain the same letters<br>> >> (including the same number of duplicates) in an arbitrary order.<br>> >><br>> >> Are you interested in faster algorithms for such a comparison?  I think<br>> >> that function could be implemented in two lines of Python, using only<br>> >> builtin functions.  And that includes the def line.<br>> >><br>> >> Did you intend to put the timings for anagramSolution2 into solu1, and<br>> >> the timings for anagramSolution1 into solu2, and thus print them out in<br>> >> reverse order?  it makes it hard to see what difference incremental<br>> >> changes might make.<br>> >><br>> >><br>> >><br>> >> -- <br>> >><br>> >> DaveA<br>> >> its for a class...we were given the anagramSolutionX functions...we have to comapre those using time.time() and get accurate reading by running each function at least 10000 times to each word from 10 to 100 in steps of 5. i went up to 200 just to see if one would increase faster as the number increased but it didn't...also i realized i had the solutions labled wrong so i was starting to switch them and didnt finish :S sorry... before i started trying to  time it, it ran creating words from 10-100 in steps of 5... make sense? the assignment we were given was to create a mkword(n) function and get it to generate the strings from 10-100 in steps of 5 and check to see which solution would be faster... <br>> >                                        <br>> > <br>> <br>> Do you realize the the difference between open-ended and closed?  When<br>> you put the 200 there, the last one it'll do is 195.  Likewise, if you<br>> said range(10, 100, 5), it would stop at 95.  That's why Steven had the<br>> +1 in his first message.<br>> <br>> <br>> <br>> -- <br>> <br>> DaveA<br></div>                                      </div></body>
</html>