On Feb 1, 2008 11:41 PM, Seon Kang <[EMAIL PROTECTED]> wrote:
> Python will not recognize the keyboard class of livewires. what is my
> problem? (i have imported the modules and everything)
> ___
> Tutor maillist - Tutor@python.org
> http://mail.python.
Python will not recognize the keyboard class of livewires. what is my
problem? (i have imported the modules and everything)
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi Sacha, I am very much a beginner to Python myself, but I tried my
hand on the Livewires modules. Here is how I solved the challenge.
from livewires import *
begin_graphics()
allow_moveables()
x=0
y=0
c = circle(x, y,5)
while x < 640:
x=x+5
y=y+3.822
move_to (c, x, y)
time.sl
[EMAIL PROTECTED] wrote on 09/10/2007 07:29:24 AM:
> Hi all
>
> just learning python really and been using the livewires tutorial /
worksheets to get some experience.
>
> I have hit an issue which is just my lack of understanding around
looping concepts and execution.
>
> My issue:
>
> in wo
Alan Gauld wrote:
> "Tonu Mikk" <[EMAIL PROTECTED]> wrote
>
>
>> I create more robots in this way which seems to work:
>> class Robot:
>>pass
>>
>
> By using an empty class you are losing m,uch of the power of classes.
>
>
I would need to learn more to handle the classes better. I
[EMAIL PROTECTED] wrote:
> >Then I was hoping to repeat the sequence for moving the robots placed
> >in
> >the robots list by using this code:
> >for x in robots:
> ># code for moving the robots
>
> Glancing at your code to move the robots. I don't see you using you x
> from for x in robots.
[EMAIL PROTECTED] wrote: ->To: tutor@python.org>From: Tonu Mikk <[EMAIL PROTECTED]>>Sent by: [EMAIL PROTECTED]>Date: 08/14/2007 03:23PM>Subject: [Tutor] Livewires - stuck on a class>>I made some progress on the Livewires robots game - I got as far as>page >10
"Tonu Mikk" <[EMAIL PROTECTED]> wrote
> I create more robots in this way which seems to work:
> class Robot:
>pass
By using an empty class you are losing m,uch of the power of classes.
Try this:
class Robot:
def __init__(self, x, y, shape=None):
self.x = x
self.y = y
Luke Paireepinart wrote:
>>
>>
>> Sure, sure. I'm glad it at least ran. I don't have livewires
>> installed so I wasn't able to test any of the code I wrote.
>>
>> Thanks again for your help. If you have suggestions on the 't' key,
>> please share them. This seems to be the one issue p
Luke Paireepinart wrote:
>
>
> I ran the code that you had included, thank you for this. It did
> produce the player and the robot on the grid, but the keyboard
> commands
> did not work. I wasn't entire sure why, but I thought I would let
> you know.
>
>
> Sure, sure. I'm gl
Luke Paireepinart wrote:
>> def place_robot():
>> global robot_x
>> global robot_y
>> global robot_shape
>> robot_y = random_between(0,47)-0.5
>> robot_x = random_between(0,63)-0.5
>>
> I'm not too clear why you're subtracting 0.5 here.
> Doesn't this make the robot's center
Tonu Mikk wrote:
> Luke, thank you for your quick and complete response. Based on your
> suggestions I have already made some progress! BTW, I am so glad that
> I can ask this list my Python questions and get help. I began feeling
> quite stuck and not knowing where to turn for help. So, tha
Tonu Mikk wrote:
> Eric Brunson wrote:
>
>> Tiger12506 wrote:
>>
>>
Based on your guidance, I figured it out. I need to use a return
statement, which I had not encountered before. Now I wrote my
definitions in this way:
def collided():
if player_x ==
Eric Brunson wrote:
> Tiger12506 wrote:
>
>>> Based on your guidance, I figured it out. I need to use a return
>>> statement, which I had not encountered before. Now I wrote my
>>> definitions in this way:
>>>
>>> def collided():
>>>if player_x == robot_x+0.5 and player_y == robot_y+0.5:
Tonu Mikk wrote:
> Tiger12506 wrote:
>
>>> Based on your guidance, I figured it out. I need to use a return
>>> statement, which I had not encountered before. Now I wrote my
>>> definitions in this way:
>>>
>>> def collided():
>>>if player_x == robot_x+0.5 and player_y == robot_y+0.5:
>>
Tiger12506 wrote:
>> Based on your guidance, I figured it out. I need to use a return
>> statement, which I had not encountered before. Now I wrote my
>> definitions in this way:
>>
>> def collided():
>>if player_x == robot_x+0.5 and player_y == robot_y+0.5:
>> return True
>>
Gr
Tiger12506 wrote:
>> Based on your guidance, I figured it out. I need to use a return
>> statement, which I had not encountered before. Now I wrote my
>> definitions in this way:
>>
>> def collided():
>>if player_x == robot_x+0.5 and player_y == robot_y+0.5:
>> return True
>>
>
> Based on your guidance, I figured it out. I need to use a return
> statement, which I had not encountered before. Now I wrote my
> definitions in this way:
>
> def collided():
>if player_x == robot_x+0.5 and player_y == robot_y+0.5:
> return True
This could be simplified more.
He
Luke, thank you for your quick and complete response. Based on your
suggestions I have already made some progress! BTW, I am so glad that I
can ask this list my Python questions and get help. I began feeling
quite stuck and not knowing where to turn for help. So, thank you for
the great ser
As promised, here's some comments on your code.
from livewires import *
begin_graphics()
allow_moveables()
def place_player():
global player_x
global player_y
global player_shape
player_y = random_between(0,47)
player_x = random_between(0,63)
player_shape = circle(10*pla
Tonu Mikk wrote:
> Thanks for offering to help! I am following the Livewires exercise
> (attached file "5-robots.pdf"). I have gotten as far as page 7.
> Attached is also my code so far in robotsarecoming-teleport.py.
> Question 1. I was checking for collision of a robot and player first
> i
Kent Johnson wrote:
> Tonu Mikk wrote:
>
>> I also
>> began reading and coding the Livewires course exercises
>> (http://www.livewires.org.uk/python/). I have gotten through the first
>> 4 exercise, but got stuck with the last one where we build a robot
>> game. The Livewires coding exerci
Tonu Mikk wrote:
> I also
> began reading and coding the Livewires course exercises
> (http://www.livewires.org.uk/python/). I have gotten through the first
> 4 exercise, but got stuck with the last one where we build a robot
> game. The Livewires coding exercise uses modules that can be down
Hello, I am at a very beginning on trying to learn Python. So far I
have read first few chapters of Alan Gauld tutorials, and completed all
the exercises of Guido van Robot (http://gvr.sourceforge.net/). I also
began reading and coding the Livewires course exercises
(http://www.livewires.org.
ryan luna wrote:
> Hey,
> So i decided to check out this Livewires Modules, but
> while running through the tutorial i run into a
> problem,
> When i was trying to do the graphics stuff,
> when i try and use this code
>
> circle(300,195, endpoints = ((280,180),(320,180)))
>
> and i get this error
Hey,
So i decided to check out this Livewires Modules, but
while running through the tutorial i run into a
problem,
When i was trying to do the graphics stuff,
when i try and use this code
circle(300,195, endpoints = ((280,180),(320,180)))
and i get this error
Traceback (most recent call last):
Compiling it in Root worked, thanks.
On 8/16/05, Luis N <[EMAIL PROTECTED]> wrote:
> On 8/15/05, ZIYAD A. M. AL-BATLY <[EMAIL PROTECTED]> wrote:
> > On Mon, 2005-08-15 at 11:52 -0400, Michael Murphy wrote:
> > > Hi all
> > >
> > > I'm having problems with installing LiveWire for python for Linux
>
On 8/15/05, ZIYAD A. M. AL-BATLY <[EMAIL PROTECTED]> wrote:
> On Mon, 2005-08-15 at 11:52 -0400, Michael Murphy wrote:
> > Hi all
> >
> > I'm having problems with installing LiveWire for python for Linux
> > (Linspire 5.0 to be exact) and I'm having trouble compiling setup.py.
> > Heres the results
On Mon, 2005-08-15 at 11:52 -0400, Michael Murphy wrote:
> Hi all
>
> I'm having problems with installing LiveWire for python for Linux
> (Linspire 5.0 to be exact) and I'm having trouble compiling setup.py.
> Heres the results:
>
> running install
> running build
> running build_py
> running ins
Hi all
I'm having problems with installing LiveWire for python for Linux
(Linspire 5.0 to be exact) and I'm having trouble compiling setup.py.
Heres the results:
running install
running build
running build_py
running install_lib
creating /usr/lib/python2.3/site-packages/livewires
error: could not
Alan Gauld wrote:
The official tutor only covers core Python, not even Tkinter.
But I believe there is a separate LiveWires tutor somewhere,
although I've never used LiveWires personally. In fact, although
I've seen it mentioned here several times I confess I don't
even know what LiveWires is! I
If you have any questions on Livewires (do you mean the Scripture Union pygame wrapper ?).
We will try to help.Send instant messages to your online friends http://uk.messenger.yahoo.com ___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailma
probably should investigate at
some point...
Alan G.
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Tuesday, March 22, 2005 10:49 PM
Subject: [Tutor] Livewires Help
> Does python tutor cover livewires w.s help?
>
_
[EMAIL PROTECTED] wrote:
Does python tutor cover livewires w.s help?
We will try to answer any questions except direct homework questions. Do you have a specific
question or problem?
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/ma
Does python tutor cover livewires w.s help?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
35 matches
Mail list logo