15,181 Topics
| |
for home work I have to write a small class that deals with something mathematical it has to have some loops... anyway if u could give me some ideas (not codes) for the theme of my classs anything that would have some loops and is not very complicated i did … | |
The code below is part of a simple craps game that I am writing for practice. I have the dice rolling down, but I can't get this betting command to work out. The only module that I am really interrested here is the bet1(x) module but I copied the entire … | |
Hello all. I have a txt file which has a number of links and i need to save this file as a .html page in my webserver.How do i append <html><body><title></title>'Content of the file'</body> </html> tags to the start and end of a file so that it is saved as … | |
Hey guys i'm new here, but i got the basics of python down and i'm having some problems with my code. All i want to do is be able to type in something and have it saved as a txt file, i have tryed numerous things and when i ran … | |
Hi guys, I'm learning python right now, and I'm having a little trouble with one of my assignments. I have to write a program that will take a word and "encrypt" it. an example, if the letter is 'a' then it should get converted to 'b'. I have the code … | |
I'm trying to modify a find/replace script that I previously got help with here on Daniweb. The script below iterates through a file A and makes replacements defined in a csv file B. My original goal was to change any line in file A containing a search string (in whole … | |
Below is code that I'm using that essentially creates fake *.avi files and puts them in a directory structure so that they can be later added into a database. The whole purpose of this is to be able to index the files without the risk of screwing up the originals. … | |
Hello I'm trying to write a program that will wrap an ASD envelop to a trangle wave sound. I can't seem to get my trangle one to work. I did get my sine wave to work. What could I change to get it to do a trangle? [code] def asd(fileName,nSeconds,cyclesPerSecond,maxAmp): … | |
""" i am having a bit of trouble with my whoWins function and my menue. i can get all of my other functions to run from main but whoWins just doesnt seem to want to work no matter what i try.i am also unsure if the dictionaries etc for the … | |
[CODE] """ cow.py a fully animated cow sprite uses graphics from reiner's tile set cow walks towards the east """ import pygame pygame.init() class Cow(pygame.sprite.Sprite): def __init__(self, screen): self.screen = screen pygame.sprite.Sprite.__init__(self) self.image = pygame.image.load("sprites/Walking1.gif") self.image = self.image.convert() tranColor = self.image.get_at((1, 1)) self.image.set_colorkey(tranColor) self.rect = self.image.get_rect() self.rect.center = (320, 240) … | |
"""hi i am having heaps of trouble with calling my whoWins function from main. i can get all of my other functions to call ok from main, but am having trouble with this one for some reason. any help would be greatly apreciated. cheers joel""" import random Ascore = 0 … | |
I am having a bit of trouble with my whoWins function and my menue. i can get all of my other functions to run from main but whoWins just doesnt seem to want to work no matter what i try.i am also unsure if the dictionaries etc for the whoWins … | |
I am a total n00b to both programming and Python. I am working my way through "Python Programming for the Absolute Beginner" by Michael Dawson. On of the "challenges" given on page 87, chapter 3 is to create a Fortune cookie program. I can't get the code I want to … | |
I have a file with a long list of English verbs and I have a set of search strings; now I want to search through the verbs to find any verb which contains any of the strings as a substring. For example, the verbs "forgotten" and "negotiate" both contain the … | |
Hi I have a function which rand digit between a and b. it maybe 2,3 or more digits. I want to save these digits in a list and then use them in another part of my program. How can I do it? [code] def dela(x): sum=0 while sum <x: b= … | |
1. Achilles and the Turtle (10 Points) Write a program that simulates a race between Achilles and the turtle. Here is an example run (the user input is underlined): Where does Achilles start? 0 How many feet is the turtle ahead? 100 How many feet does Achilles run per second? … | |
OK, here is a litting script I wrote (admittedly with some help from [URL="http://www.pythonware.com/library/tkinter/introduction/hello-again.htm"]http://www.pythonware.com/library/tkinter/introduction/hello-again.htm[/URL])that will allow me to cloak in with ease here at work. Only.... since I sometimes log into the computer multiple times in the day, I wanted to use Tkinter to give me a yes/no button. But.... … | |
Hi All In perl we have something like www:mechanize to interact with web sites.Is there any equivalent one in python??? Can anyone help me in this regard?? | |
Hi all - hope you are well. I am trying to print out only the first 15 characters of each line of a text file. The trouble is I am not sure how I would go about doing such a thing! Any help will be greatly appreciated. Thank you for … | |
I am using a while loop like while a>0: a=a+1 a1=open("/python25/file1.txt","r+") a2=str(a) a3=a1.write(a2) It is storing only the last value of a, but how can I store any row or all the rows in file? | |
Hi I have an idea to rand some digit which sum is equal to my inputs digit. If I put in 12 then I like to have 4, 2, 6 or 4,4, 4 or 3, 3, 3, 3 …….etc. Not more and not lease then my input. In my function … | |
I'm trying to figure out how to input metadata into a tiff file, and my general web searches are just confusing me. Is there anyone that can point me in the right direction? I'm essentially trying to pull data from an excel file and use that as the metadata for … | |
Hey all, I'm new at programming with Python and thru reading different documentation, I built a small program (handler), that I want to accept calls from other scripts to log to file and console, depending on the level passed in. I'm able to get the error message to show up … | |
Hi all, hope you are well. Just a quick one here that you pythons will be able to answer in no time (I am new with python). What I am trying to do is read a text file and print only the first and last line of that file. Any … | |
Hi all, Im new to python and I need some help. I have tried to get this piece of code to work for quite some time now. I finally made it work by using two while-loops. [INDENT][B]THE PROBLEM[/B][/INDENT] What I really wanted to do at the first place was to … | |
I'm trying to automate a series of find/replace actions. I have an input file containing a large list of stemmed verb forms like this: apolog apologis becam apologis apologis apologis apologis becom becom aris arisen arisen I want to change every "apologis" to "apolog", every "arisen" to "aris" and so … | |
Hi there, This is a part of a project that i am doing.... the thing is that i want to link MS Excel with internet explorer in a manner such that whenever any page on the explorer opens it highlights the words that are present in the excel sheet.. I … | |
Hi, I have written a the following python code to analyse a function or a method. I am having a script which is having a python function (add) and a class (MyClass) with a method (multiply).When I analyse it using the following method(analyze_func) , I get an output like below. … | |
could anyone please tell me if pyTTS module is available in python version 1.4.0 3rd edition | |
Ok, I have been given this problem to code a solution with python Problem Definition The N.S.W. Bird Watching Library sends a reminder notice to its borrowers when it is found that a borrower has failed to return a book by the due date. It is possible that a borrower … |
The End.