aregee wrote:
> Double Squares
> A double-square number is an integer X which can be expressed as the
> sum of two perfect squares. For example, 10 is a double-square because
> 10 = 32 + 12. Your task in this problem is, given X, determine the
> number of ways in which it can be written as the su
hey all thanks for yr help,i got it right .n sorry for
confussions...i m very new to python...just started learning it couple
of days ago...
Ian Kelly wrote:
> On 1/8/2011 11:10 PM, aregee wrote:
> > pie.py:3: Deprecation Warning: integer argument expected, got float
> >for b in range(0,(x
On Jan 9, 7:10 am, aregee wrote:
> Double Squares
> A double-square number is an integer X which can be expressed as the
> sum of two perfect squares. For example, 10 is a double-square because
> 10 = 32 + 12. Your task in this problem is, given X, determine the
> number of ways in which it can be
On 1/8/2011 11:10 PM, aregee wrote:
pie.py:3: Deprecation Warning: integer argument expected, got float
for b in range(0,(x**0.5)/2):
I expect you want range(0, int((x / 2) ** 0.5) + 1), no?
for b in range(0,(x**0.5)/2):
a = (x-(b**2))**0.5
try:
a = int(a)
except:
prin
On Jan 9, 6:14 pm, Gary Herron wrote:
> On 01/08/2011 10:10 PM, aregee wrote:
>
> > Double Squares
> > A double-square number is an integer X which can be expressed as the
> > sum of two perfect squares. For example, 10 is a double-square because
> > 10 = 32 + 12. Your task in this problem is, giv
On 01/08/2011 10:10 PM, aregee wrote:
Double Squares
A double-square number is an integer X which can be expressed as the
sum of two perfect squares. For example, 10 is a double-square because
10 = 32 + 12. Your task in this problem is, given X, determine the
number of ways in which it can be wri
On 01/09/2011 01:10 AM, aregee wrote:
>
> Double Squares
> A double-square number is an integer X which can be expressed as the
> sum of two perfect squares. For example, 10 is a double-square because
> 10 = 32 + 12. Your task in this problem is, given X, determine the
> number of ways in which it
Double Squares
A double-square number is an integer X which can be expressed as the
sum of two perfect squares. For example, 10 is a double-square because
10 = 32 + 12. Your task in this problem is, given X, determine the
number of ways in which it can be written as the sum of two squares.
For exa