15,181 Topics

Member Avatar for
Member Avatar for breatheasier

Hi, I'm wanting my program to loop and create different files outputting at different stages in a while loop, I just can't work out how to make it happen! here's a stupid example [code=python] while (a<10): a = a+1 if (a=4) or (a=6): output = open('output'+a, 'w') #something like this? …

Member Avatar for xopenex
0
5K
Member Avatar for Eclipse77

Hi, I'm in need of some help in using functions for the hangman game. The professor doesn't understand how difficult it is for a first time programmer and just doesn't explain new concepts thoroughly. The game that I'm trying to code looks like this: Enter the secret word: LETTERS ------------------------------------------------------------ …

Member Avatar for woooee
0
3K
Member Avatar for 47pirates

I have a server in python and client in java and i want to share images through the socket how can i do so? help plz

Member Avatar for dantinkakkar
0
167
Member Avatar for arindam31

Hi , I want to achieve something like this . Consider the example [CODE]>>> txt 'arin.thearc@gmail.com' if '@' or '.' in txt: do something[/CODE] I just want to know how can we nest ORs and ANDs inside the if or while loops...

Member Avatar for TrustyTony
0
215
Member Avatar for vlady

hi! I have another struggle. I'd like to have this kind of output: [COLOR="Green"]som object studenta: Janko Mrkvicka som object predmetu: fyzika, mam znamky: [4, 1] a priemer: 2,5[/COLOR] How can I make it? my output is a bit different (it is in last line): [COLOR="Red"]som object studenta: Janko Mrkvicka …

Member Avatar for Lucaci Andrew
0
132
Member Avatar for Thropian

I started looking into networking and storing/altering data on a computer. I've got everything running, but can't get it to work from an outside computer. Is there an easy way to get past the LAN restrictions or am I going to have to change settings on my router?

Member Avatar for ihatehippies
0
292
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
691
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
206
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
754
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
357
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

The End.