Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for RMartins
Member Avatar for pythonBasic
0
713
Member Avatar for RMartins

How can we in python change the number of elements in a line to the next, this is, for example... We have the following txt file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 And we want a program which the output …

Member Avatar for woooee
0
91
Member Avatar for RMartins

I´m a begginer in java and i would like to know how can i create graphs like: y=ax+b for example thanks

Member Avatar for RMartins
0
93
Member Avatar for RMartins

Can anybody tell me how can i avoid the overflow of this program? from math import sqrt f=lambda n: sum([int(i)*int(i) for i in str(n)]) L=[] for n in range(0,10**20): if sqrt(f(n))%1==0:# == float(int(sqrt(f(n)))): L.append(n) L.sort() print "Número de quadrados perfeitos na lista:",len(L) print L y= lambda L: reduce(lambda x,y: x+y,L) …

Member Avatar for G-Do
0
82
Member Avatar for RMartins

does anybody knows why this function doesn´t work very well: f=lambda n: reduce(lambda x,y:x**2+y**2, map(int,str(n))) I want that this function add the square of the digits of a number an example of what i want: f(442)=4**2+4**2+2**2=36 and it's giving me f(442)=1028!!!:S However fou numbers with 2 digits the function works!

Member Avatar for Ene Uran
0
166