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 >> > > This could be simplified more. > Here's an example as a hint. These two functions are the same. > > def f(): > if a == b and c == d: > return True > > def g(): > return (a==b and c == d) > > I got it. I will do it like this: def collided(): return (player_x == robot_x+0.5 and player_y == robot_y+0.5)
Thank you, Tonu -- Tonu Mikk Educational Technology Consultant Digital Media Center - dmc.umn.edu [EMAIL PROTECTED] 612 625-9221 _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor