Hello,
I have this programm:
def encapsulate(val, seq):
if type(seq) == type(""):
return str(val)
if type(seq) == type([]):
return [val]
return (val,)
def insert_in_middle(val, seq):
middle = len(seq)/2
return seq[:middle] + encapsulate(val, seq) +
On 09/05/2010 03:48 PM, Evert Rol wrote:
On 5 Sep 2010, at 22:31 , Micheal Beatty wrote:
On 09/05/2010 03:16 PM, Evert Rol wrote:
I'm having a little problem figuring out how to accomplish this simple task.
I'd like to take a list of 6 numbers and add every permutation of those numbers
in g
On 5 Sep 2010, at 22:31 , Micheal Beatty wrote:
> On 09/05/2010 03:16 PM, Evert Rol wrote:
>>> I'm having a little problem figuring out how to accomplish this simple
>>> task. I'd like to take a list of 6 numbers and add every permutation of
>>> those numbers in groups of four. For
On 09/05/2010 03:16 PM, Evert Rol wrote:
I'm having a little problem figuring out how to accomplish this simple task.
I'd like to take a list of 6 numbers and add every permutation of those numbers
in groups of four. For example for 1, 2, 3, 4, 5, 6 add 1 + 1 + 1 +1 then 1 + 1
+ 1 +2 etc. unt
>
> I'm having a little problem figuring out how to accomplish this simple
> task. I'd like to take a list of 6 numbers and add every permutation of
> those numbers in groups of four. For example for 1, 2, 3, 4, 5, 6 add 1 +
> 1 + 1 +1 then 1 + 1 + 1 +2 etc. until reaching 6 + 6
Okay, thanks everyone for all the help!
On Sun, Sep 5, 2010 at 3:40 PM, David Hutto wrote:
> On Sun, Sep 5, 2010 at 3:32 PM, aug dawg wrote:
> > I took a look at Blender, but it all seemed very overwhelming. If I
> wanted
> > to, could I code all of the blocks? I want to have some functionalit
On 09/05/2010 02:22 PM, Evert Rol wrote:
I'm having a little problem figuring out how to accomplish this simple task.
I'd like to take a list of 6 numbers and add every permutation of those numbers
in groups of four. For example for 1, 2, 3, 4, 5, 6 add 1 + 1 + 1 +1 then 1 + 1
+ 1 +2 etc. unt
Should have sent this to the list too
-- Forwarded message --
From: Micheal Beatty
Date: Sun, Sep 5, 2010 at 2:38 PM
Subject: Re: [Tutor] for loop results into list
To: Andre Engels
On 09/05/2010 02:16 PM, Andre Engels wrote:
>
> On Sun, Sep 5, 2010 at 8:51 PM, Micheal Beatty
I took a look at Blender, but it all seemed very overwhelming. If I wanted
to, could I code all of the blocks? I want to have some functionality for
people adding their own bricks and other items.
On Sun, Sep 5, 2010 at 2:04 PM, David Hutto wrote:
> I'd suggest you take a look at blender. It ha
>>> I'm having a little problem figuring out how to accomplish this simple
>>> task. I'd like to take a list of 6 numbers and add every permutation of
>>> those numbers in groups of four. For example for 1, 2, 3, 4, 5, 6 add 1 + 1
>>> + 1 +1 then 1 + 1 + 1 +2 etc. until reaching 6 + 6 + 6 + 6. U
On Sun, Sep 5, 2010 at 8:51 PM, Micheal Beatty wrote:
> On 09/05/2010 01:26 PM, Evert Rol wrote:
>>>
>>> Hello all,
>>>
>>> I'm having a little problem figuring out how to accomplish this simple
>>> task. I'd like to take a list of 6 numbers and add every permutation of
>>> those numbers in group
On 09/05/2010 01:26 PM, Evert Rol wrote:
Hello all,
I'm having a little problem figuring out how to accomplish this simple task.
I'd like to take a list of 6 numbers and add every permutation of those numbers
in groups of four. For example for 1, 2, 3, 4, 5, 6 add 1 + 1 + 1 +1 then 1 + 1
+ 1
> Hello all,
>
> I'm having a little problem figuring out how to accomplish this simple task.
> I'd like to take a list of 6 numbers and add every permutation of those
> numbers in groups of four. For example for 1, 2, 3, 4, 5, 6 add 1 + 1 + 1 +1
> then 1 + 1 + 1 +2 etc. until reaching 6 + 6 +
Hello all,
I'm having a little problem figuring out how to accomplish this simple
task. I'd like to take a list of 6 numbers and add every permutation of
those numbers in groups of four. For example for 1, 2, 3, 4, 5, 6 add 1
+ 1 + 1 +1 then 1 + 1 + 1 +2 etc. until reaching 6 + 6 + 6 + 6. Usi
I'd suggest you take a look at blender. It has a pretty easy to use
game engine with actuators, sensors and controllers, with a Python
scripts api. It'll take the time out of going 3-d with pygame, and you
can build the custom legos within it as well.
___
On Sat, Sep 4, 2010 at 6:16 AM, Steven D'Aprano wrote:
> On Sat, 4 Sep 2010 11:57:00 am David Hutto wrote:
>> First of all, I'll respond more thoroughly tomorrow, when I can
>> review what you said more clearly, but for now I'll clarify.
>>
>> Here is the whole code that I'm using:
>>
>> http://pa
That would work, but I want there to be a palette and then the user can drag
the Lego, flip it, and turn it. In order to do this, it would have to be 3D.
On Sun, Sep 5, 2010 at 11:32 AM, Che M wrote:
>
>
>
> > Would Pygame allow me to code all of the bricks instead of drawing them
> out?
>
> I'
On Mon, 6 Sep 2010 01:45:30 am William Allison wrote:
> I'd like to write a program to help find words for Scrabble but I've
> been having trouble
> right from the beginning.
>
> tiles = 'aeirstw'
>
> dictionary = ['aardvark', 'cat', 'dog', 'taste', 'stare', 'wrist']
>
> for word in range(len(dicti
I'd like to write a program to help find words for Scrabble but I've
been having trouble
right from the beginning.
tiles = 'aeirstw'
dictionary = ['aardvark', 'cat', 'dog', 'taste', 'stare', 'wrist']
for word in range(len(dictionary)):
for letter in range(len(dictionary[word])):
if d
> Would Pygame allow me to code all of the bricks instead of drawing them out?
I've never used Pygame; I have no idea. What I was suggesting was just getting
a picture of a real or Lego-like brick from somewhere and using that image in
your program. No drawing required.
On Sun, Sep 5, 2010 at 4:17 PM, Roelof Wobben wrote:
> I understand the error message.
> I follow this example in the book :
> http://openbookproject.net/thinkcs/python/english2e/ch11.html
> And there element is not defined.
It is:
for element in nested_num_list:
--
André Engels, andreeng..
Would Pygame allow me to code all of the bricks instead of drawing them out?
On Sat, Sep 4, 2010 at 10:35 PM, Che M wrote:
>
>
> > How would I go about creating custom GUI elements? For example,
> > if I wanted to make a simple LEGO maker app, how would I write the
> > code for the bricks so th
> From: st...@pearwood.info
> To: tutor@python.org
> Date: Sun, 5 Sep 2010 23:55:32 +1000
> Subject: Re: [Tutor] (no subject)
>
> On Sun, 5 Sep 2010 11:44:09 pm Roelof Wobben wrote:
> > Hello,
> >
> > I have made this program as solution to a exercise from thinking like
> > a computer scienti
On Sun, 5 Sep 2010 11:44:09 pm Roelof Wobben wrote:
> Hello,
>
> I have made this program as solution to a exercise from thinking like
> a computer scientist.
[...]
> But now Im getting this error message :
>
> Traceback (most recent call last):
> File "C:\Users\wobben\workspace\oefeningen\src\test
Hello,
I have made this program as solution to a exercise from thinking like a
computer scientist.
def encapsulate(val, seq):
if type(seq) == type(""):
return str(val)
if type(seq) == type([]):
return [val]
return (val,)
def insert_in_middle(val, seq):
middle = len(seq)/2
return seq[:
> On 9/4/2010 10:14 AM, lists wrote:
>>
>> Hi folks,
>>
>> I'm new to Python, I'm working my way through some intro books, and I
>> have a question that I wonder if someone could help me with please?
>>
>> This is my attempt at solving an exercise where the program is
>> supposed to flip a coin 10
Bill Allen wrote:
Thanks to everyone who replied. Some of the methods presented where some I
had thought of, others were new to me. Particularly, I did not realize I
could apply a slice to a list. The for x in some_stuff[:value] form worked
very well for my purposes. I can also see I need
27 matches
Mail list logo