Posts
 
Reputation
Joined
Last Seen
Ranked #455
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
87% Quality Score
Upvotes Received
17
Posts with Upvotes
14
Upvoting Members
11
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
5 Commented Posts
~97.9K People Reached
Favorite Tags
Member Avatar for Iceman10284

Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in an array and the display the following data: • The lowest number in the array • The highest number in the array • The total of the numbers in …

Member Avatar for booicu
-1
7K
Member Avatar for BigPaw

Which is the most popular editor on these forums, please? Especially so, an editor that takes Python to the maximum of what it is capable of achieving. I'm hoping that I won't need such-and-such an editor to do this, and such-and-such an editor to do that... An all-in-one if possible. …

Member Avatar for Lardmeister
0
267
Member Avatar for jamison234

Hi All, I am a newbie programmer in python and I am trying to read multiple csv files from a folder, perform some data sums based on timestamps for each row for all the csv files and then output the sums to one result csv file. So far I am …

Member Avatar for hughesadam_87
0
4K
Member Avatar for shayallenhill

Which is smarter? class HoldAttr(object): pass a = HoldAttr b = getattr(a, 'attrname', []) b.append(1) setattr(a, 'attrname', b) # or try: b.a.append(1) except AttributeError: b.a = [1] ... or something else? Trying to learn.

Member Avatar for hughesadam_87
0
336
Member Avatar for hotblink

Hi there, I just wanted to ask how I would go about writing a single function to count the frequency of numbers 0-10 including .5(such as 1.5,2.5) This is what I have done file = open ('grade.txt', 'r') s=file.readline() grade=[] while s[0:3]!="EOF": s=s.replace(' ','') lst=s.split(',') if lst[0][0]!='I': grade.append(float(lst[5])) print(lst) s=file.readline() …

Member Avatar for hughesadam_87
0
384
Member Avatar for fantasma.delespacio.773

I've been looking for a way to work with polynomials using python, did someone already wrote a code to do that?. Here's what i have until now using dictionaries as polynomials -for example: x^4-6x^2+1 would be {4:1, 2:-6, 0:1}-, someone have any suggestion to make? def degree(f): t = sorted(f.keys()) …

Member Avatar for hughesadam_87
0
165
Member Avatar for Wire.Crisis

Hello all. I am very excited to have found this place in that I might better my very shoddy coding skills. I am trying to learn Python with a couple of books and some ideas for programs. I am trying to figure out a matter of what I think is …

Member Avatar for Lardmeister
0
400
Member Avatar for weblover

Hi, I'm trying to apply a linear regressipn function to my numpy array and then store the results in a new array. But i have 2 things that are not working for me. def regressioncal(valarray): new_col = [] linregres valarray = numpy.array(valarray) l=20000 for t in xrange(1,5000,10): for j in …

Member Avatar for weblover
0
296
Member Avatar for Inshu

Can I append a list obtained from a Class as output outside the class , if Yes how ?? can i use userList for this purpose ?

Member Avatar for Schol-R-LEA
0
204
Member Avatar for hughesadam_87

Hi guys, This feels like something that should be possible in Python, and something that I feel like I should know how to do. Image I have a list of numbers: items=[10,20,30] Let's say I wanted iterate over them and define two new variables, a and b. a=[] b=[] for …

Member Avatar for hughesadam_87
0
177
Member Avatar for padton

Hi all, I am looking at neat ways of re writing this code below, especially the for loops as I would have over 50 of these statements if I did this the manual way shown below. n = 50 files = [open("files%i.txt" % i, "w") for i in range (n)] …

Member Avatar for Gribouillis
0
210
Member Avatar for kRaeTwin

Hi, I've just started learning Python and for my first script I wanted to make something that would make life easier and that I would actually use, so starting small I've began working on a Torrent Search script that uses the ISOHunt API. However I've ran into a problem in …

Member Avatar for woooee
0
1K
Member Avatar for nUmbdA

I am in a Fundamentals of Programming class which we are using Python. In the book was a simple code to solve a problem where a cook knows in cups how much he needs but we are converting it to ounces. I was playing around with that and trying to …

Member Avatar for glenwill101
0
580
Member Avatar for hughesadam_87

Hi guys, I am running a costly simulation and trying to optimize the output. I'd have a fixed range over which the parameter of interest can vary, and about 100 values it can take in between. We know the result we are looking for and want to find the parameter …

Member Avatar for hughesadam_87
0
160
Member Avatar for hughesadam_87

Hi guys, I've downloaded 2 cached_property implementations from the internet and both did not work correctly for my programs. Does anyone here used a cached_property function that works really well and could share with me?

Member Avatar for hughesadam_87
0
240
Member Avatar for mahmoud.eddeen

My pc has been infected by a very harmfull virus , this virus close and restart windows explorer repeatedly in very short time , I cant use the computer, Please help me about the name of this virus and how can I remove it. Thanks in advance

Member Avatar for nand.prist
0
223
Member Avatar for littleEuler

def main(): celsius = float(input("What is the Celsius temperature? ") fahrenheit = (9/5) * celsius + 32 print ("The temperature is ", fahrenheit, " degrees Fahrenheit.") main() error output: Syntax Error:(line 8) fahrenheit = (9/5) * celsius + 32 This makes perfect sense to me. How can i fix this …

Member Avatar for hughesadam_87
0
108
Member Avatar for jim.lindberg1

Hi! I have a beginners problem I really need some help with. First of all, here is my current program: def texten(): filehandle=open ( 'savetonight.txt', 'r' ) text=filehandle.read() return text def smabokstavertext(): texten() print text.lower() I basically want my function smabokstavertext() to call the first function texten() and then print …

Member Avatar for hughesadam_87
0
135
Member Avatar for crishein14

Can anyone HELP me for my problem .. Im a newbie in python ! I want to create a script to rename files in a dir. that dir has 400 files .png .. startswith 001.png , 002.png to 400.png ! I want to rename them startswith 000.png to 399.png .. …

Member Avatar for M.S.
0
165
Member Avatar for lewashby

movies = ["The Holy Grail", 1975, "Terry Jones & Terry Gilliam", 91, ["Graham Chapman", ["Michael Palin", "John Cleese", "Terry Gilliam", "Eric Idle", "Terry Jones"]]] print(movies[4][1][3]) In the above code, how does [4][1][3] result in "Eric Idle"? It looks to me like the 4 selects Eric Idle becaue it's the 4th …

Member Avatar for ~s.o.s~
0
140
Member Avatar for hughesadam_87

Hi, I'm having some difficulty reading in boolean values from a file, particularly false values. Python can understand false values as empty strings, as well as a few other ways. For example: In [43]: bool(0) Out[43]: False In [44]: bool(False) Out[44]: False In [45]: bool('') Out[45]: False The problem is, …

Member Avatar for woooee
0
868
Member Avatar for nishu..

can anyone give simple example of storing data in datastore in google apps engine using python . thnx

Member Avatar for hughesadam_87
0
173
Member Avatar for hughesadam_87

Hi, I am trying to create the most general function possible to test if an object passed into it has mutability or not. With some prior help from pytony, it seemed that the best way to do this is to try to set and attribute. If the attribute can be …

Member Avatar for hughesadam_87
0
3K
Member Avatar for ceck30s

I have a text file that contains something like this: # Comment # Comment # Comment # Comment # Comment Comment # Comment #Raw SIFs at Crack Propagation Step: 0 # Vertex, X, Y, Z, K_I, K_II, K_III, 0 , 2.100000e+00 , 2.000000e+00 , -1.000000e-04 , 0.000000e+00 , 0.000000e+00 , …

Member Avatar for hughesadam_87
0
332
Member Avatar for TrustyTony

Here is slow brute force way to find the largest palindromic product of three digit integers. You could do loop and break out of it if you go under the smaller number (the second one) of best solution found so far to be more efficient etc.

Member Avatar for hughesadam_87
0
544
Member Avatar for python1956

Hi guys, With Python, I am using genfromtxt (from numpy) to read in a text file into an array: `y = np.genfromtxt("1400list.txt", dtype=[('mystring','S20'),('myfloat','float')])` Which works okay, except it doesn't seem to read my 2 columns into a 2D array. I am getting: [('string001', 123.0),('string002', 456.0),('string002', 789.0)] But I think would …

Member Avatar for vegaseat
0
538
Member Avatar for ryantroop

So, maybe this is a concept out of the domain of programming... but I think not. Lets say we have a 400MB video file that we want to either send somewhere, or stream. Can we use python to break it into binary, break the binary into chunks, and then send …

Member Avatar for hughesadam_87
0
165
Member Avatar for neriahfred

Hi, I'm new to Python. Can someone please guide me in writing a Python script that bulk processes audio files and image files to create an audiovisual or movie out of them. Say we have 20 images and 20 audio files and want to create 20 video files out of …

Member Avatar for hughesadam_87
0
190
Member Avatar for imixkumuku

I'm trying to open a tex file from within python, tell the tex editor to run (manually you would press ctrl + T) and finally close the program. So far I can only figure out how to open and close the program. this is what I have so far... os.spawnv(os.P_WAIT, …

Member Avatar for hughesadam_87
0
1K
Member Avatar for ProNewb

So far, I think I'm doing it right however it doesn't seem to generate the results I wanted. def occurrence(e,List): for item in List: s = 0 if item == e: s += 1 return s Basically I want my function to count how many times e occurs in List. …

Member Avatar for ProNewb
0
172