On Friday, December 11, 2015 at 7:55:59 PM UTC-5, Steven D'Aprano wrote:
> On Sat, 12 Dec 2015 10:19 am, phamton...@gmail.com wrote:
>
> > Can anyone direct me in the direction where to start the code for the
> > randomized of the ball to start.
>
> [...]
> > move_ball(-10, 7, 0)
>
>
> That s
from Tkinter import *
window = Tk()
canvas = Canvas(window, width=500, height=500, background="green")
canvas.pack()
def mouse_paddle_move(event):
mouseY = event.y
current_coords = canvas.coords("paddle")
x1 = current_coords[0]
y1 = current_coords[1]
x2 = cu
Can anyone direct me in the direction where to start the code for the
randomized of the ball to start.
from Tkinter import *
window = Tk()
canvas = Canvas(window, width=500, height=500, background="green")
canvas.pack()
def mouse_paddle_move(event):
mouseY = event.y
current_coo
from Tkinter import *
window = Tk()
canvas = Canvas(window, width=500, height=500, background="green")
canvas.pack()
def move_ball(speed_x, speed_y):
box = canvas.bbox("ball")
x1 = box[0]
y1 = box[1]
x2 = box[2]
y2 = box[3]
if x1 <= 0:
On Saturday, November 7, 2015 at 9:40:49 PM UTC-5, MRAB wrote:
> On 2015-11-08 02:11, phamton...@gmail.com wrote:
> > I am having issue with converting the string into a float because there is
> > a negative, so only end up with "ValueError: invalid literal for float():
> > 81.4]"
> >
> > def con
I am having issue with converting the string into a float because there is a
negative, so only end up with "ValueError: invalid literal for float(): 81.4]"
def contains_words(word,msg):
if word in msg:
return true
else:
return false