Thank you all.
On Thu, Feb 13, 2014 at 10:47 PM, Walter Prins wrote:
> Hi,
>
> On 13 February 2014 06:44, Santosh Kumar wrote:
> > I am using ipython.
> >
> > 1 ) Defined a string.
> >
> > In [88]: print string
> > foo foobar
> >
> > 2) compiled the string to grab the "foo" word.
> >
> > In [8
On Sat, Feb 15, 2014 at 04:25:34PM +, Marc Eymard wrote:
> Can somebody explain why both low_range and high_range are still
> returning their initial values ?
Because you haven't changed either of them. Imagine the chaos if every
time you did arithmetic on a variable, Python changed the var
On 15/02/14 16:25, Marc Eymard wrote:
Here is what happens in my script:
>>> import random
>>> low_range = -1
>>> high_range = 101
>>> random.randint(low_range + 1, high_range - 1)
56
>>> low_range
-1
>>> high_range
101*
I was rather expecting:
On 02/15/2014 11:25 AM, Marc Eymard wrote:
Hello Tutor,
I need to generate a random integer between 0 and 100.
The range is supposed to be adjusted by my two variables:
low_range and high_range.
The logic of using the variables as part of the function arguments is
to manage to get a smaller
Hello Tutor,
I need to generate a random integer between 0 and 100.
The range is supposed to be adjusted by my two variables:
low_range and high_range.
The logic of using the variables as part of the function arguments is to manage
to get a smaller range each time the function is called excludi
Hi David,
Thanks for your input about the logic of this little script of mine.
I confess I omitted the edge possibility and assumed heads or taisl only.
As I progress further with getting the foundation knowledge of the language
itself, it is really appreciated to be corrected on what good prog
On 15/02/14 13:35, Bunny Sehgal wrote:
I am doing "Building Skills in Python". In the Generator Function
example at
I assume you are talking about this one:
spins = [('red', '18'), ('black', '13'), ('red', '7'),
('red', '5'), ('black', '13'), ('red', '25'),
('red', '9'), ('black', '26'
I am doing "Building Skills in Python". In the Generator Function example
at [url]
http://www.itmaybeahack.com/homepage/books/python/html/p02/p02c08_generators.html#generator-function-example[/url]i
can't understand, how it is working properly.
what i understood is as follows:>
1)First it makes cou