15,190 Topics
![]() | |
I created 2 classes and I need to pass Name, Dept., Birthdate and HireDate from the Employee class to the Date class. I get the month date and year from input prompts. The problem I have is how to get those dates for the employee passed into the date class. … | |
So I've been writing this application that works with files , and I wanted to add a list of recently opened files in the "File" menu and I came across a weird bug .. Here's the sample code .. [code] for path in recentFilesList: item = wx.MenuItem(menu, wx.NewId(), path) self.Bind(wx.EVT_MENU, … | |
Hi, How can I print this figure if I have an array like this? It should be a for-loop but donĀ“t know how. [CODE] labyrinth = \ [[0,0,0,0,0,0,1,0], [0,1,0,1,1,1,1,0], [0,1,1,1,0,1,0,0], [0,1,0,0,0,0,0,0], [0,1,1,0,1,1,1,0], [0,0,1,1,1,0,0,0], [0,1,1,0,1,1,1,0], [0,1,0,0,0,0,0,0]] [/CODE] figure: ############. ## ## ##. . . . ## ##. . . ## #### … | |
Please help! I need to write a programe, that would draw a picture like this: [URL="http://yfrog.com/6ptreelj"]http://yfrog.com/6ptreelj[/URL] I've tried with recoursion but it doesn't work properly. from turtle import * [CODE]tree(n, lenght): if n == 0: lt(90) fd(lenght) rt(45) fd(lenght/2) bk(lenght/2) lt(90) fd(lenght/2) bk(lenght/2) rt(45) else: rt(135) tree(n-1, lenght/2)[/CODE] | |
Hi How can I delete a file after a certain time? for example if I want to delete a file after 08.30 has passed? do I use import OS? and import time? | |
I have no clue how to start this Use the for and while iterative structures within Python to program a loop that generates a list of odd numbers from 1 to 33 inclusive. (two sets of code here!) | |
python.org tell people to forget about python 2 and head into python 3, but many 3rd party module do not support python 3 at all. For example, python 3 only ship with a tkinter gui module which does not have great reputation. If I am to use python 3, I … | |
Hi, this is my first post here at Daniweb. Seems like an active and friendly environment. I have very limited experience with programming in general, and even more so with GUI programming. As the title suggests, I want to stop a while loop by the use of buttons. When I … | |
Hey guys! This is my very first post on this website. Anyways, I just started learning Python, and am reading an ebook, called "A Byte Of Python". So at the end, it says to create an address book application. In my application, it basically just creates a text file with … | |
Hey DW. I'm trying to figure out a way so my TCP Server and client can seamlessly send messages back and forth without having to take turns sending the message. Python isn't my language of choice but it's the one i have to use for this assessment. I'm also using … | |
I've learn python and I won't say that I know it all, but I won't see anywhere except google will use python. New programming language like python and ruby, do they have space to grow? | |
This snippet defines a function to merge sorted iterables containing similar items into a single iterable. Items are supposed to be sorted in ascending order. Only one item per iterable is stored at a time. | |
python code to create a Class called Car for automobile objects. The class constructor a color attribute. Be sure to include a constructor with the color parameter. The constructor should include a message that a Car of the appropriate color has been created. here is my code: [CODE]class Car(object): """A … | |
im trying to edit this class so it takes a letter grade instead of a number to find the gpa but im at a total loss any ideas? [code]class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) self.qpoints = float(qpoints) def getName(self,name): #name=input("what is the students … | |
I'm trying to search a specified range of numbers and I'm currently using regular expressions. The lines I'm searching contain numbers from 00 to 30, but I only want to find the lines containing 02 to 22. I have tried a few different things, but none of them work. this … | |
Hello! (I would like to use tkinter. ) I'm going to do my program who convert roman letters to arabic numbers and vise versa. I'm going to do two buttons and a textfield where you can write in the number or letters and then choose if you want it transelate … | |
Hi, im trying to figure out how to call a function's variable from here [CODE]def legal_moves(board): moves = [] for square in range(DINNER): if board [square] == SPACE: moves.append(square) return moves[/CODE] I want to take the variable moves and use it for main How would I do that? | |
[CODE]ENSTRUG00000000009 ENSTRUT00000000011 1026 509 5896 ENSTRUG00000000011 ENSTRUT00000000014 420 63 482 ENSTRUG00000000012 ENSTRUT00000000015 10902 15313 93157 ENSTRUG00000000012 ENSTRUT00000000016 2844 23243 60985 [/CODE] as this is my input file it has five coloumns and there is for each line , we have to identify unique entry from the first coloumns which high … | |
I did an accidental overwrite of the pre-instealled Python framework in the System directory of my Mac running OSX 10.5.9. From the official Python website: "The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively. You should never modify or delete these, as they are Apple-controlled and are … | |
Hi all, I am trying to update the colour of a Tkinter label, so as the value of a variable changes so to does the colour of the text. Below is a simple example of what I am trying to achieve, but the problem is when I press the button … | |
Hi, I am having some trouble writing this code. The question is as follows: The Sieve of Erastophenes is an algorithm -- known to ancient greeks -- that finds all prime numbers up to a given number n. It does this by first creating a list L from 2 to … | |
Hello all, I've been stumbling (more like Stumbling, I hope) across the web looking for something that can do occasional screen captures using a cron job on my casual gaming site server. I was hoping to be able to save screen captures of a few characters as I leveled them … | |
Srpn is a reverse polish notation calculator with the extra feature that all arithmetic is saturated (i.e. when it reaches the maximum value that can be stored in a variable, it stays at the maximum rather than wrapping around). Program must be able to input at least two numbers and … | |
[CODE]def work(here): variabel = "Hi" x1.here(variabel)[/CODE] How can I make here as a local parameter? that will work for calling other functions? | |
hi, I try to write a app to automatically re-organize my mails (thunderbird). The first thing I try is to re-create my folders tree, once for each year. So i need to read mbox files and rewrite them [CODE=python] import mailbox mbx=mailbox.mbox("./in_mbox") mbx.lock() of=open("out_mbox", "w") for k, m in mbx.iteritems(): … | |
hi all, i just doing Django..tried the first example in Django book...i encountered problem at admin page. it says that admin is not defined. i followed each step in tutorial and i am able to run django server also. pls help me to solve it. i am adding error output … | |
hey, I don't know if you have seen my other post or not, but I have been working on a small code lately to get the users credentials such as their password and username. As you can see, the code gives a warning and says there is a problem with … | |
I have just started using python and am trying to write a program that generates 200 random numbers in the range (1,50),then counts the number of occurrences of each number and prints the frequency of occurrence. I have created the part of the code which generates the random numbers. I … | |
Hi. I have a function that needs to split a string on the seperators given by the function. so if i had the seperators as !.?: then it should split the string at those points. if i have a string 'hello. world! hello.' how can i return a list with … | |
I'm trying to sort a 3D array and having little success. I have read various methods on how this is done for two dimensions, but I can't seem to scale it up. example array: [CODE]r =[[['steve',1, 40], ['steve',3, 20], ['steve',2, 30]], [['john',5, 50], ['john',6, 40], ['john',4, 30]]][/CODE] I want this … |
The End.