Re: compute the double square...... :(

2011-01-09 Thread Alan Mackenzie
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

Re: compute the double square...... :(

2011-01-09 Thread aregee
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

Re: compute the double square...... :(

2011-01-09 Thread Cedric Schmeits
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

Re: compute the double square...... :(

2011-01-09 Thread Ian Kelly
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

Re: compute the double square...... :(

2011-01-09 Thread Owen
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

Re: compute the double square...... :(

2011-01-08 Thread Gary Herron
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

Re: compute the double square...... :(

2011-01-08 Thread Corey Richardson
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

compute the double square...... :(

2011-01-08 Thread aregee
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