15,175 Topics

Member Avatar for
Member Avatar for Kitty17

Hi guys, I'm new to this website so if I made some mistake please forgive. :) I just want to learn more about Python , I'm new to Python and i'm trying to improve. Here is my work (took some help from Daniweb) i just want to ask that how …

Member Avatar for Lucaci Andrew
0
690
Member Avatar for Fitchie

I have never used Python before, and unfortunately, this makes me completely ignorant. For this I apologise. I have a Dell Dell Latitude D430 laptop running Mint Katya I am attempting to start up a python script which is used to program 4 servos. I have python 2.7.1-0 as supplied …

Member Avatar for Fitchie
0
292
Member Avatar for pwolf

The exercise says the following: """ Pairwise comparision of DNA sequences is a popular technique used in Bioinformatics. It usually involves some scoring scheme to express the degree of similarity. Write a function that compares two DNA sequences based on the following scoring scheme: +1 for a match, +3 for …

Member Avatar for TrustyTony
0
1K
Member Avatar for straylight

So I have a program that takes the value of an item.. checks the values with price then prints a result. Now my professor is asking for a 4th function that acts as a "data exchange" between the other 3 functions and act like a host for all the values …

Member Avatar for TrustyTony
0
163
Member Avatar for weIIet

hi all i have a homework for Lehmann primality test and i have to know very big numbers as big as x**(2**128) python is enough for 2**128 but when numbers bigger than it don't do it my teacher python has a structure for it and i didn't find it for …

Member Avatar for Thisisnotanid
0
2K
Member Avatar for TLSK

I have create in MySQdb a DB with a table named example,in this table i want to save a name, this name is in Greek language.My problem is thw follown when i try to save the name instantly without use textctrl, its ok but when i use textctrl i take …

Member Avatar for TLSK
0
239
Member Avatar for dineshswamy

how can i calculate float value? eg it is 32/10 3.2 in calculator in python 32/10 is 3.0 help me out

Member Avatar for dineshswamy
0
205
Member Avatar for floatingshed

I need a custom dialog. I've been playing around for hours trying to create one and simply don't get it! All I need is the standard wx.TextEntryDialog but with 2 text fields. Can anyone please help? Thanks.

Member Avatar for floatingshed
0
99
Member Avatar for vlady

Hello! I don´t understand how to use a condition " if i == predmet: " i is an objet type of subject In my code I need to reach the condition: [ICODE]def add_mark(self,predmet,mark): for i in self.predmety: if i == predmet: print True[/ICODE] but I don´t know how to make …

Member Avatar for vlady
0
122
Member Avatar for KickAssElmo

So I need to write a function that if a file exists, it will change the file name by sequentially adding integers, starting with 1, to the base file name (the part that does not include the file extension). so if the filename is hello.dat, then it will return hello1.dat …

Member Avatar for ihatehippies
0
249
Member Avatar for Poikaer

I'm in a computer programming course on Florida Virtual School, and I'm stressing out over our current assignment, because it seems like it should be easy. The point of the assignment is to write a program to count how many times the Scribbler robot stalls and then print the results …

Member Avatar for Poikaer
0
153
Member Avatar for pythonn8

hi , how can i print data as grid view in python, in my case a variable is carrying all the data which is coming from table and i want to print them by using two nested loops. [CODE]data_from_table = ['col 1'] + "/t" + ['col 2'] + "/t" + …

Member Avatar for pythonn8
0
361
Member Avatar for ljvasil

Hi everyone, I've written a cellular automata code in python that updates land uses based on each cell's adjacent neighbors. I import a text file as a dictionary with cell id: land use code. I also import a text file with each cell's adjacent neighbor. I then run the cellular …

Member Avatar for ljvasil
0
175
Member Avatar for Lucaci Andrew

So, what is my deal... I'm working on a script, which, at some point will require the user to insert his or hers username and a password. My question is, how can I make that when the user will write in the password box/line whatever, instead of its characters, to …

Member Avatar for Lucaci Andrew
0
175
Member Avatar for Tashalla

I have a battleship python assignment due in an hour and I can't figure out where the error is in this code. It seems like when player 2 plays sometimes the coordinates saved in Board.remaining_ships can't be deleted because they aren't there. Please please please help Here is the error: …

Member Avatar for woooee
0
753
Member Avatar for Yoink

I'm a beginner with python and I'm trying to write a program that asks the user for how many classes they have taken, then asks them for the class codes and prints the classes they have left to take. I can get the program to run perfectly for one list …

Member Avatar for Yoink
0
191
Member Avatar for rajendrakrp

[CODE] list1 = [4,5,6] for n in list1: print "list1:", list1 print "n:", n list1 = [7,8,9] [/CODE] output: list1: [4, 5, 6] n: 4 list1: [7, 8, 9] n: 5 list1: [7, 8, 9] n: 6 list "list1" is not affecting even though it is re-assigned in for loop. …

Member Avatar for bumsfeld
0
100
Member Avatar for Dann0

Hi guys, I'm trying to make an enemy object follow a player object but I'm having a problem with picking up the player co-ordinates, it gives me an error "Player object has no attribute x" Here's whats iv'e got: [CODE] import pygame pygame.init() class Player(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.image = …

Member Avatar for Dann0
0
2K
Member Avatar for MarcusMaximus

Hi, I'm looking for a way to getthe domain a computer is connected to and the name of the domain controller if possible. I've looked at the os, socket and platform and can't find anything. I have been able to retrieve various bits of system info using these modules but …

Member Avatar for MarcusMaximus
0
110
Member Avatar for Thisisnotanid

I was wondering, is it possible to do something like the following? The given code obviously doesn't work. [CODE] l = 5 (l == 5)*(k = 7) #Returns error message.[/CODE] The reason is, I'd rather avoid doing something like the following for the project I'm currently working on. [CODE] if …

Member Avatar for Thisisnotanid
0
179
Member Avatar for me_mie

Hi :) Can anyone help me? I want to display image in my GUI using tkinter (python 3.2.2) Do i need to download this python image library ==> PIL-1.1.7.win32-py3.2 or actually it was already in tkinter? How about the code? Thanks for the help.

Member Avatar for me_mie
0
355
Member Avatar for pualane

Hello! I have a class project and attempting to use a listbox to read a string of tab data from a simple text file. When the string of data is printed to the python shell the rows of string data appears to be spaced. However, when the string of data …

0
36
Member Avatar for Lucaci Andrew

I keep getting this error and i don't understand why. [code]Traceback (most recent call last): File "E:\University\Workspace eclipse\dictionares\src\dcts\dicts.py", line 105, in <module> fr_runt() File "E:\University\Workspace eclipse\dictionares\src\dcts\dicts.py", line 95, in fr_runt run.run() File "E:\University\Workspace eclipse\dictionares\src\dcts\dicts.py", line 58, in run self.data.write(file, key, value) File "E:\University\Workspace eclipse\dictionares\src\dcts\dicts.py", line 23, in write fh = …

Member Avatar for Lucaci Andrew
0
308
Member Avatar for Landen-S-Brown

I just joined this community, after searching and not finding what i was looking for. I am new to programming, I'm just 15, my dad programs for a living, but doesn't know much with python. Forgive me if my code is sloppy, i have been told so by my dad …

0
47
Member Avatar for Ryan0

In the following code I am trying to select a file either from a file chooser or just typing out the path. The problem is I want the comboboxentry to change background color when something is put in it. The code works fine if it's a combobox (Line 7 is …

Member Avatar for Ryan0
0
617
Member Avatar for unigrad101

I would like to create a function using the code below called drawMove which takes 2 parameters (x or 0) and square number. That draws an x or 0 in the numbered boxes on the grid below. Input should be: drawMove(turtle,cellsize,O,6) ---> this should draw a O in the 6th …

Member Avatar for woooee
0
132
Member Avatar for hughesadam_87

Hey guys, I have a simple numpy datatype: [CODE]spec_dtype = np.dtype([ ('wavelength', float), ('intensity', float) ])[/CODE] I chose to use this in my program because it's very easy to read in 2-column spectral data files using the genfromtxt() method. Therefore, I made a fairly sizable program around this datatype. Now …

Member Avatar for hughesadam_87
0
242
Member Avatar for Griever

I am having problems with a GUI I'm working on. The idea is to have a tree list of signals and be able to drag them onto the plot. Eventually having a long list of signals and multiple plots etc.. However the code segmentation faults after a seemingly random number …

0
89
Member Avatar for unigrad101

I am trying to create a function which would take a list and be able to count the number of ints floats and str in that list. output should be: list = ['v', 3.0,1, 'etc'] freq = countDataTypes(list) print(freq) [2,1,1] any help would be greatly appreciated so far: [CODE] >>> …

Member Avatar for bumsfeld
0
135
Member Avatar for apeiron27

def fnKey(dic, value): return [k if value == v else pass for k, v in dic.iteritems()] can anyone tell me why this doesn't work? i'm trying to return the key for a known value from a dictionary

Member Avatar for TrustyTony
0
40

The End.