15,181 Topics
| |
I am doing a project where I read in a CSV file and I iterate through each row in the file. I then compare a specific column from each row, if a row with the specified column has the same value as another row with the specified column I would … | |
hi, i have a big exe program that i wrote in c# (big means that i have a lot of class in it), i want to write a script in python that will check the program. what is the right way to check the program, convert the c# program to … | |
i want the stars to appear in the night, but it only come out one?? can anyone help me what i should do to make about 50 stars randomly appear in the night?? thank you so much! [CODE]from graphics import * import random def stars(x,y): '''draw white line representing one … | |
Good day, Hi, I'm trying to develop mapping feature for a tool. It has a wx.ScrolledWindow that contains wx.lib.buttons.GenBitmapTextButton as map nodes. When the number of map nodes reached around 50+ the scrolling becomes too slow. Any ideas on how to improve the performance of the scrolling when there are … | |
Hello, for our last assignment we were asked to read an input file then plot this data using a bar chart. we have to make the bar chart using turtle module in python using functions. I really have so little time to do this, if anyone can give me a … | |
I have 3 functions working together, but I only have abundant returned every single time, I don't know what is wrong [CODE]def sumDivisors(n): total = 0 for counter in range(1, n): if (isDivisor(n, counter)): total += counter return total def checkForPerfect(n): total = sumDivisors if (total == n): return 'Perfect' … | |
I want to give command line arguments to a file and then executive that python file from within my master python file. How should I go about this? I don't really care about the standard output. The file that I want to executive from with my file just outputs all … | |
I'm trying to make a script that downloads from a specific website etc... it's done and everything. The problem is I need to compile it to a .exe for people to use and I noticed there isn't a py3exe to do this... So I downloaded python 2, and tried to … | |
Using Python with pylab included, I have created a plot. In the plot's title, I am including a variable from the program. I save the plot as a ps and every thing looks great. However, when I try to print the document to paper or to a pdf, the numbers … | |
I have an old computer that doesn't have internet access. It does have Python 2.6 which supposedly has Tkinter. The problem is, it returns an error that Tkinter module is not installed. I searched the net, and saw that I may have to manually install tcl/tk. Done. I tried [CODE]import … | |
Hey, I have one question though, how do you write on a txt file??? | |
This is a nice command prompt I wrote up a month ago. It's still in the Beta stages however. Anyways, here's a brief overlay of what it does: 1) Takes user input of a function, creates an x/y table and plots it 2) Change the x-range 3) Graph waves (Main … | |
Hi everyone, I'm trying to make a Space Invaders clone with pygame (python SDL library, if you hadn't guessed ;) ). The problem I'm having is that when the space invaders move down and change direction they break formation (some move left/right to far). Here is what I think is … | |
as you know I'm making a text adventure using Python. Should I put the monster's stats into a class or dictionary? Please suggest. All suggestions welcome! | |
can anyone here help me write a code like these graphics:[url]http://www.cs.utk.edu/~booth/[/url] i have been searching how to these, but i only saw you guys using turtle, python.game, etc.. i need a code for only python22 (graphics.py) i can only do stick figures, it would be a great help if someone … | |
can anyone help how to move the car to the traffic lights? and something is wrong with my traffics lights too..it does not seem to change the color after 5 sec..it just stay still?? and my stickfigure is not sticking with the face?? please help! i am using graphics.py [CODE]from … | |
| Hi everyone, I just started learning Python 3.1 (never done programming before). I just wrote this useless little program. It seems to work but I would just like a little bit of feedback as to how well I executed the idea. Basically I want to know if I am making … |
I am working on a guessing game in Python and would like some feedback on how the code looks. I am struggling a bit with it, particularly with the menu options and getting it to loop back to the menu again after it has written to a high scores txt … | |
This has probably been asked a lot of times, but I tried searching and couldn't find anything relevant. I am building an application in Tkinter that should launch on system start up and stay open until you close it or shut down your computer. The problem is, I don't want … | |
We take a look at the various functions of module time, counting seconds and milliseconds, measuring the time a simple for-loop takes, inspect a list of time data and ways to display it in a useful manner. An attempt is made to find the day of the week, given a … | |
can someone tell me what is wrong with my code?? i cannot make this face. thank you! using graphics.win [code] from graphics import * import time def moveAll(shapeList, dx, dy): for shape in shapeList: shape.move(dx, dy) def moveAllOnLine(shapeList, dx, dy, repetitions, delay): for i in range(repetitions): moveAll(shapeList, dx, dy) time.sleep(delay) … | |
Hello everybody, I'm new to Python wx and I'm trying to make an application which requires the use of database content. I've already made the input data frame. I need to make a frame where to list the database content. I need to create a label for each row like … | |
can anyone help me draw a five star using graphics.py?? i keep trying, but it comes out unbalance. Thank you so much for your help! | |
Each time I create a new GUI, the bit that I always hate, is the bit where the buttons and entries look like I am working on a Windows 98 machine, isn't there a way to make my buttons and entries look like Qt would look like? They're well squary … | |
I have a code in which the user should pass something through raw_input, this works fine for strings less then one line, but when I copy-paste a longer string, only the first line is passed by raw_input, how can I also past the rest of the string? | |
I'm using the rsa module (easy_install rsa), and if I use it from command line: [code=python]import rsa public,private = rsa.gen_pubpriv_keys(3) cipher=rsa.encrypt("test",public) rsa.decrypt("cipher",private)[/code] this will return test again. (like expected) but in my code it gives a zlib error -3 incorrect headers [code=python]def RSA(txt): global crypt if crypt=="en": key=raw_input("Public key:") ciphertext=rsa.encrypt(txt,eval(key)) … | |
I'm stuck on this part of my program, im using graphics.py to implement a linear regression line. I think I'm making a stupid error but cant wrap my head around it. The BIG part I'm stuck on is that im supposed to make a "button" in the lower left corner … | |
UnboundLocalError: local variable 'gold' referenced before assignment ...[CODE]if chooseItem == "1": gold, arrows, whip, cannnonballs, heartPotions, megaHeartPotion, infinityPotion, infinityXPotion, duelBloodXXHealer, bloodXHeal, energyYPotion, basicRainbowHealer = bloodXHealerZZ.buy(gold, arrows, whip, cannnonballs, heartPotions, megaHeartPotion, infinityPotion, infinityXPotion, duelBloodXXHealer, bloodXHeal, energyYPotion, basicRainbowHealer)[/CODE] | |
I'm making an archery game and I need to shoot 5 arrows and assign a point value to each spot of the target. Bulls eye is worth 9 and each ring out from there is worth 2 less. I am having trouble figuring out how to assign a score to … | |
just need some advice on making a list containing values for Tkinter buttons. thankyou :) |
The End.