Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
86% Quality Score
Upvotes Received
11
Posts with Upvotes
8
Upvoting Members
9
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
1
4 Commented Posts
~36.1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for prakash2813

Hello, please check the attachment for details. What i need is : The sum of all the full_trade_amount for that route The list of routes that share a customer with that route The number customers shared with that route The number of columns with data can vary so a route …

Member Avatar for lukerobi
-2
168
Member Avatar for A_Dubbs

I am doing my homework and am having trouble on a certain problem. [I]4) A certain CS professor gives 100-point exams that are graded on the scale 90-100:A, 80-89:B, 70-79:C, 60-69:'D, <60:F. Write a program that accepts an exam score as input and prints out the corresponding grade.[/I] We have …

Member Avatar for vegaseat
0
12K
Member Avatar for lukerobi

I am currently trying to load a few script through boost python. I ran into some trouble today while trying to launch idle from it however and I cannot figure out the cause of the issue. This is on a windows 2008 machine, and I am currently running Python 3.3 …

Member Avatar for lukerobi
0
410
Member Avatar for trips.dude

Hi All, I am new to the programming world. I was just writing this code to generate N prime numbers. User should input the value for N which is the total number of prime numbers to print out. I have written this code but it doesnt throw the desired output. …

Member Avatar for samvinogar
0
17K
Member Avatar for lukerobi

[code] class MyList(list): def __new__(cls, *p, **k): if not '_the_instance' in cls.__dict__: cls._the_instance = list.__new__(cls) return cls._the_instance def append(self, name): if name not in self: list.append(self, name) def extend(self, names): for name in names: if name in self: continue list.append(self, name) def remove(self, name): if name in self: list.remove(self, name) …

Member Avatar for Gribouillis
0
98
Member Avatar for Malinka

Dear all, may be someone can help me to find a solution to the following problem: I have a list of patterns (len=5) that are presented as tuples in a list, e.g. patterns = [('w1','X1','w1','Y1','w1'), ('w2','w2','X2','w2','Y2'), ('w2','X2','w2','Y2','w2')] I want to go through all sentences in a text file (one sentence …

Member Avatar for Malinka
0
96
Member Avatar for rackster992

Hello Everyone I am new to this forum and new to learning Python. I was looking for a good book to help teach it to myself and on a recommendation purchased the book [I]Python Programming In Context[/I] by Bradley Miller and David Ranum. This is a good book in terms …

Member Avatar for dcghelp
0
1K
Member Avatar for krishna_sicsr

Hi All, I need to parse the out from following output: I need to get the adapter detail after the heading "System Adapter Configuration:" This adapter detail is in 2nd cloumn like ACPI_IA64_P, ACPI_IA64_B, XBUS and PCI. I have marked the desired output in [COLOR="Red"]RED[/COLOR] color. Please help me in …

Member Avatar for krishna_sicsr
0
136
Member Avatar for mms6

I want to allow certain characters to a string For example I want strA to contain either 'A' or 'B' or 'C' or 'D' How do I do that, help would be greatly appreciated. Thanks strA = 'A' or 'B' or 'C' or 'D'

Member Avatar for mms6
0
85
Member Avatar for mms6

My code is [CODE]def is_base_pair(str1, str2): if lens(str1) == 1 and lens(str2) == 1: if (str1 == "A" and str2 == "T") or (str1 == "G" and str2 == "C") or (str1 == "T" and str2 == "A") or (str1 == "C" and str2 == "G"): return True else: return …

Member Avatar for vegaseat
0
125
Member Avatar for msaenz

I have a dicationary [code=python] x={'symbol':LTV,'user':derek,'where':home,'time':night} [/code] Obviously when u print it the dictionary doesnt keep the order you put them in. how do i have a dictionary that has it the way i input them? I looked online, but not sure to you cmp, lambda, etc? Thanks for the …

Member Avatar for vegaseat
0
163
Member Avatar for mms6

[CODE]def get_even_palindrome_at(user_input, index): user_input = user_input.lower() user_input = remove_non_words(user_input) start_index, end_index = index, index while start_index >= 0 and end_index < len(user_input): if user_input[start_index] == user_input[end_index]: start_index -= 1 end_index += 1 else: break result = "" count_index = start_index while count_index < end_index: result += user_input[count_index] count_index = count_index …

Member Avatar for Kolz
0
69
Member Avatar for thehivetyrant

Evening there. [B]I need to return an (x,y) tuple of an object, This x,y will be used to help 1 object calculate where the other object is and move towards it.[/B] My problem is that both the objects need to know the others' x,y. (i'm unsure how to get the …

Member Avatar for thehivetyrant
0
845
Member Avatar for vnproduktionz

kind of a basic question but i cant seem to figure it out. well i have a list and i split it up using the split function but now im confusing how i can use one string and divide it to another. i tried turning it into a int or …

Member Avatar for vnproduktionz
0
163
Member Avatar for vnproduktionz

[CODE]reply=float(raw_input("Enter your choice: ")) if reply!=1 or reply!=2: print "Not a Valid Choice" [/CODE] i cant use while loops other wise i prob wouldve done so. Basically im trying to get the user input to only allow the numbers 1 or 2. anything else should give a not a valid …

Member Avatar for vnproduktionz
0
137
Member Avatar for pyprog

Hey, everyone. I know how to strip certain characters from a string using for loop. Can you give an example of how that can be done with the use of while loop?

Member Avatar for Gribouillis
0
103
Member Avatar for python.noob

though i'm calling pr() function in the subclass after calling the get_details() function(which assigns value to name) it doesn't print the current value of name. My question is if i want to print the value of name in the subclass what should i do???? I've tried in many ways using …

Member Avatar for AutoPython
0
216
Member Avatar for denniskhor

The modification code that i wan is: When: m = "i wan do something" i need a modification code when get m result... the code will automatic modify it become: "i[B]\\[/B] wan do [B]\\[/B]something"

Member Avatar for lukerobi
0
75
Member Avatar for simpatar

I've got a book for python 2. in school and the problem is that we're programming in 3. which makes it difficult from time to time to get it right, cause you cant just copy the text in the book to the shell. I'm stuck with this ex: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # …

Member Avatar for bumsfeld
0
259
Member Avatar for srk619

how do you write a command that turn left or right at an angle in a superclass is it like this: def left(self): self.position += self.angle return (self.position) its part of Object oriented Python

Member Avatar for vegaseat
0
81
Member Avatar for lewashby

I more than half way through the book "Python programming for the absolute beginner" 2nd Ed. and things are really starting to get hairy. The book has me to write some code just before or after explaining each part. But I have to really concentrate on the paragraph I'M reading …

Member Avatar for willygstyle
0
300
Member Avatar for Kruptein

okay I tried to make a reverse of finding the num value of a letter bu it returns in an error :f [quote]Traceback (most recent call last): File "/home/darragh/Bureaublad/t.py", line 15, in <module> numtolet('A') File "/home/darragh/Bureaublad/t.py", line 6, in numtolet letters['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] TypeError: list indices must be integers, not tuple[/quote] [code=python]def …

Member Avatar for bumsfeld
0
197
Member Avatar for jmark13

So the Goal is: given a Nested list that contains 3 elements in each element in the nest, i.e. L1=[[1,2,3],[4,5,6],[7,8,9],[10,11,12]] how can I take a flat list, i.e. L2=[1,2,3,4,11] where if the elements within the nested list, i.e. L1[0], L1[1], etc. intersect with any single element in L2, the element …

Member Avatar for lukerobi
0
190
Member Avatar for lukerobi

How would i do this? [code] import random name = random random.name [/code] I dont cant to use name = random.random, as name is something that could change

Member Avatar for lukerobi
0
163
Member Avatar for lrh9

Out of curiosity, how would you reverse a string's case in Python? Make uppercase characters lowercase and lowercase characters uppercase. Here's the function for the naive implementation. [CODE] #!/usr/bin/env python def flip_case(input_string): temp_list = list(input_string) for index, character in enumerate(temp_list): if character.islower(): temp_list[index] = character.upper() else: temp_list[index] = character.lower() output_string …

Member Avatar for lukerobi
0
251
Member Avatar for edificationtube

I am taking a Python programing class at college, but we've haven't done very many complicated things and I want to develop this program for my wife for one of her music classes: A program that takes mp3s with specific titles, artists/composers, and year written/composed, and outputs random 30 sec …

Member Avatar for lukerobi
0
63
Member Avatar for moedoc10

1) Write a function called divisors that takes two natural numbers m and n, and returns a List object containing all natural numbers (starting from m, and going down to 2) by which n is divisible. For example: divisors(6, 6) should return a List object equivalent to List(6, List(3, List(2, …

Member Avatar for lukerobi
0
101
Member Avatar for lukerobi

Could anyone lend some help? Trying to figure out how to do this in SQLite3 (this is mySQL) [code] CREATE TABLE car_contacts ( id INTEGER NOT NULL AUTO_INCREMENT, carriers_id CHAR NOT NULL, name CHAR NULL, phone CHAR NULL, phone_ext INTEGER NULL, fax CHAR NULL, email CHAR NULL, PRIMARY KEY(id, carriers_id), …

0
85
Member Avatar for lukerobi

lets say i have 2 lists: lista = [1,2,3,5,6,7] listb = [4,5,6,7,8,9,10] The lists can be different lengths, and may not allways be unequal lengths. The higher average will allways be in listb, so that is the 1 constant we can rely on. This works for even teams: [code] average …

Member Avatar for vegaseat
0
96
Member Avatar for MichelleCrews

hey, ima first time programmer and i no clue whats going on someone please help!! i have to write a function called number_of_2s that includes one parameter, N, where N is a positive integer that is no more than 10 digits long. the function should return the number of times …

Member Avatar for MichelleCrews
-1
102