89 Topics

Member Avatar for
Member Avatar for ddanbe

Although [url=http://en.wikipedia.org/wiki/Roman_numerals]roman numerals[/url] sneak in our lives from time to time, we(luckily) don't use them very often. Probably the reason why the Romans where not that good at calculating things. That changed, more than 1000 years later, with [url=http://en.wikipedia.org/wiki/Fibonacci]this person[/url] who introduced to the Western world the number system we …

Member Avatar for gracefull
0
1K
Member Avatar for JoshuaBurleson

So I've finally fixed up the functionality of an address book I've been writing (not on to utilizing a GUI yet of course though.)However to save or reclaim the data from the last use of the address book I, obviously, need to write and reclaim it from a .txt file, …

Member Avatar for JoshuaBurleson
0
236
Member Avatar for JoshuaBurleson

I am having issues finding a way to have the below program search for any given string of "query" in the keys of the dictionary AB and return the value, or the key and value. Thus far I just done what I have preset in the dictionary; Ashley and Joshua, …

Member Avatar for JoshuaBurleson
0
269
Member Avatar for zidaine

why is it that when i pop a dictionary in variable b, variable a does the same? And When i print variable a, the value is [{'b':2}]. How can i retain the value of variable a? [CODE] a=[{'a':1,},{'b':2,}] b = a b.pop(0)[/CODE]

Member Avatar for TrustyTony
0
137
Member Avatar for ankurvit

Hi, I'm looking to code the following problem in python. If (for example) dict={A:0.7,B:0.8,C:0.9,D:2.3,E:0.1,F:2.4} and so on.. (i have a big dictionary of A-Z something like this) I'm looking to find repeated substring in a string that has a dissimilarity of no longer than 0.5 (between highest and lowest). The …

Member Avatar for TrustyTony
0
192
Member Avatar for Joe34

Where can I get a free mysql thesaurus database? I would literally like to download a .sql file, and just upload it straight to my mysql host. I would just want in the thesaurus... Word Synonym #1 It would be great if it also had... Part of Speech Synonym #2 …

Member Avatar for kirstiebevilaqu
0
272
Member Avatar for ocramferreira

Hi all, well my problem isn't a practical problem. I have a project to do which is a word game.First of all i have a .txt (a dictionary) my program has to fetch a random word and shuffle it. With the combination of those letters the program has to find …

Member Avatar for iamthwee
0
560
Member Avatar for banannamoofin

One part of my program requires that the user enters a date and this date is then checked against each product in the dictionary to see if the date the product arrived plus its shelf life causes the product to expire before or after the date entered by the user. …

Member Avatar for woooee
0
2K
Member Avatar for Mark_48

The dictionary part isnt working. can anybody help?? [CODE] string path = @"C:\1\"; string[] file1_Lines = File.ReadAllLines(path + @"TraceSet.csv"); string file2 = File.ReadAllText(path + @"SBoxOutput.csv"); string[] file2_Lines = file2.Split(new string[]{"\r\n"}, StringSplitOptions.RemoveEmptyEntries); //creating 2 lists for average values of file1 and file2: List<float> averageFile1 = new List<float>(); List<float> averageFile2 = new …

Member Avatar for Mitja Bonca
0
155
Member Avatar for pokemal

Hi friends, I need very urgent Turkish-English dictionary program code (university project) Would help please.

Member Avatar for Zjarek
-3
85
Member Avatar for parijat24

[CODE]hi I am generating program to find keys in adictionary having same value in abig dictionary please see the example [B]cluster1 [/B]ENSTRUP00000000001 ENSTRUP00000000001 ENSTRUP00000001433 ENSTRUP00000030987 ENSTRUP00000031348 ENSTRUP00000033778 ENSTRUP00000034939 ENSTRUP00000036445 ENSTRUP00000041507 [B]cluster2[/B] ENSTRUP00000000004 ENSTRUP00000000004 ENSTRUP00000000270 ENSTRUP00000004241 ENSTRUP00000010453 ENSTRUP00000012064 ENSTRUP00000015898 ENSTRUP00000019830 ENSTRUP00000024116 ENSTRUP00000026101 ENSTRUP00000027201 ENSTRUP00000028303 ENSTRUP00000028313 ENSTRUP00000029002 ENSTRUP00000031498 ENSTRUP00000032796 ENSTRUP00000032823 ENSTRUP00000033498 ENSTRUP00000036274 …

Member Avatar for woooee
0
119
Member Avatar for D3BuG

Hey guys, So me and my friend are starting up a simple Text-Based-Post-Apocalyptic-Role-Playing-Game. Both of us have had 2 or so months of experience, we are no experts. So, I will appreciate any tips. I have been lurking these forums for a little while now, and decieded this is the …

Member Avatar for D3BuG
0
163
Member Avatar for knan

Hi can anyone tell me how to remove empty keys in the following dictionary d={'a':[],'b':['1','2'],'c':[]} I want it to be d={'b':['1','2']} I tried this. But its showing error. I know its wrong to change the size of a dictionary during iteration. But is there any other way? [CODE]>>> for x …

Member Avatar for TrustyTony
0
18K
Member Avatar for knan

I have a list [CODE]x = ['abc','1','2','3','def','6','8','5','13','mcg','568','35469','6453'][/CODE] I want the output file in a dictionary as follows: [CODE]dict = {'abc':['1','2','3'],'def':['6','8','5','13'],'mcg':['568','35469','6453']}[/CODE] How can i do this?

Member Avatar for TrustyTony
0
202
Member Avatar for knan

I have dictionary with single element lists. [CODE]dictionary={'a':['A'], 'b':['B'], 'c':['C']} [/CODE] How can i change it to [CODE]{'a':'A', 'b':'B','c':'C'}[/CODE]

Member Avatar for TrustyTony
0
146
Member Avatar for Ptap03

Hello, First I would like to say thank you for looking and any help will be greatly appreciated. I am trying to write a code which does the following: 1) Read a file (The file contains list of words) 2) The purpose of the program to ask the user to …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for Clawsy

I have too make an application in C that uses a dictionary. I have 54000 words in a file, on per line and I need a way to handle it. - I first wanted to keep it in an array but as it's bigger that INT (32767) I cannot do …

Member Avatar for Adak
0
130
Member Avatar for techie1991

I want to sort a list of dictionaries using the inbuilt sort() function for lists. The problem is I am not able to understand, how to give the function a key.. Example: [CODE] a={'name':1,'data':200} b={'name':2,'data':400} c=[a,b] [/CODE] Now, I want to sort the list c with the key being a['name']. …

Member Avatar for TrustyTony
0
221
Member Avatar for dreadyteddy

Basically need help with one evil section of code! My program opens a start window which introduces the program. A start button leads to a second window with a number of buttons. The main two are "open" and "find restriction site". Im having problem with the code for the latter. …

Member Avatar for dreadyteddy
0
229
Member Avatar for dreadyteddy

I am TRYING to write a program that finds restriction sites in a DNA file and returns a picture and information box of the enzyme which cuts it. My problems are; a) I have no idea if my program works past opening the file directory. b) I dont know how …

Member Avatar for dreadyteddy
0
834
Member Avatar for girlscodetoo

Hi Guys! I am a Python noob. I wanted to merge data and eliminate duplicates. I have the solution. Now I am stuck at dumping the dict contents to MySQL. Any help is really appreciated. Data : [QUOTE]a b c d e f key dupe -------------------- 1 d c f …

Member Avatar for girlscodetoo
0
178
Member Avatar for jpob

Hey, i am new to python. I am making a translator in python 2.6 using basic commands. The translator is english to german. I need to use a i need to use a text file like this... at an brown braun cat raze etc. so far i have created lists …

Member Avatar for jpob
0
252
Member Avatar for ragavh

i need to create a program that translates an english phrase to a spanish phrase. i have a text file with english words and their spanish meaning. i am unsure how to start this as i am quite new to phyton. ignore the grammar, i want to translate the phrase …

Member Avatar for jcao219
0
163
Member Avatar for varuab

Greetings, I just want to know how to split a string using values of dictionary: dic = {'': '000', ' ': '011', 'e': '1111', 'g': '10', 'h': '010', 'o': '00', 'p': '1101', 's': '1110', 'r': '1100'} word = '1000011100001110001101010111111001110000' for items in dic.values(): [INDENT]word.split(items)[/INDENT] .... and when i do this …

Member Avatar for woooee
0
151
Member Avatar for doctorjo5

I know that this is an easy one but it is hard for me to figure out. I need to make a program that can: * Open the file and read through all of the lines in the file. (got this) * If a line starts with "Subject:", skip the …

Member Avatar for woooee
0
159
Member Avatar for jfoster80

Hi, I'm not just new to this forum, but I'm also very new to programming and C#... so be warned! I am using a dictionary list to hold my usernames for an application I'm making. It's never actually going to be used, but it's purely to develop my knowledge. Firstly, …

Member Avatar for jfoster80
0
289
Member Avatar for furblender

Completely frustrating - I have been googling for a solution for this for a couple of hours now. I have this little bit of code that I wish to read a text file into a Python Dictionary. I used this dictionary format internally within the another piece of code I …

Member Avatar for furblender
0
3K
Member Avatar for chase32

I am trying to combine two multi-element dictionaries but am running into a problem. From the example below, what I expected was the dictionary x to contain all three unique combinations. What seems to have happened is that the y dictionary overwrote the x dictionary. Am I just using this …

Member Avatar for vegaseat
0
197
Member Avatar for newsguy

If you spend anytime online, posting in forums, discussing blog entries and getting involved in heated IM conversations then the chances are you have said it. Even Lisa and Bart Simpson have said it. Meh. We said meh! Now, meh is officially a word rather than just an online utterance. …

Member Avatar for jbennet
0
185

The End.