I think this maybe will work out. I might have to just go with the
generalized form as you suggest
and forget about the random aspect.
In a message dated 12/6/2008 10:05:16 A.M. Central Standard Time,
[EMAIL PROTECTED] writes:
Please use the reply-all button when responding, so tha
Please use the reply-all button when responding, so that your message
gets sent to the list as well.
If that's the sort of equation you're after, than the easiest way
would probably to decide on a generalised form:
y=(2x-1)*4x
y = 4*x**2 - 4x
y=2+5(x-1)
y = 5*x - 3
y=(2x+5)+(5x-25)
y =
I would say, though, that you should be careful in your implementation of
is_on_line, for floating point round-off errors. Try this at the command
prompt (Python 2.5.2, with __future__ division imported):
>>> 49 * (1/49) == 1
False
>>> 1 - 49 * (1/49)
1.1102230246251565e-016
I would suggest a sl
When you say linear, I'm assuming fitting y=mx+c, and passing through
points?
The line through points (x1, y1) and (x2,y2) is
y - y1 = (y2-y1) / (x2-x1) * (x-x1)
That multiplies out to:
y = (y2-y1)/(x2-x1) * x - (y2-y1)/(x2-x1) + y1
That gives m = (y2-y1)/(x2-x1) and c = y1 - (y2-y1)/(x2-x1
I am starting out with 7 fixed reference points. From there I want a
program that can randomly
generate linear equations. After the equations are generated I would then
like to randomly insert
the 7 fixed reference points into the equations and calculate the results.
I currently have seve
www.google.com/search?q=pygtk+tutorial
www.google.com/search?q=python+random+generator
www.google.com/search?q=python+dict
If you would like to develop the game, you should first try to develop the
game, and then ask when you get stuck.
If you can't figure out how to get a user to guess between o
hi, can u tell me any good tutorial site for pygtk, any that contains detail
explanation of pygtk.
i want to develop a game,that will randomly generate the operands,and the
answer,a user have to chosse from the operators(+,-,*,/).
which function should i use to randomly generate equation.
_