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
~485 People Reached
Favorite Forums
Favorite Tags
Member Avatar for bradley1234

If I input an arbitrary amount of points [x1,y1].....[xn,yn] into a function I need to somehow return/print the shortest distance between all of the points. I understand how to find the distance between two points (fairly easy and straight forward), but how do I take an arbitrary amount of points …

Member Avatar for vegaseat
0
185
Member Avatar for bradley1234

We have a list of numbers, for example, [1,1,1,1,2,2,3,4,5,3,3,3,11,12]. Because we have four 1's, two 2's, etc. The new list would be as followed: [1,4,2,2,3,1,4,1,5,1,3,3,11,1,12,1]. I have the following code, but I am stuck. Can anyone give me advice? def rlEncode(data): for i in range(len(data)): n = data[0] if n …

Member Avatar for Schol-R-LEA
0
103
Member Avatar for bradley1234

I want to make two polynomials and then add them. We have two lists, [1,2,0,3] and [2,3,0,0,1]. The polynomials are as followed: 3x^3+2x+1 and x^4+3x+2. I have the following code, but I'm getting stuck. Any advice? I'm new to python. def polyAdd(poly1,poly2): for i in range(len(poly1)): z = poly1[i] return …

Member Avatar for vegaseat
0
197