14,962 Topics

Member Avatar for
Member Avatar for Cosmo_Kramer

3 1 100 80 2 100 70 3 110 60 4 140 50 5 140 200 6 230 10 7 235 200 8 240 20 9 240 30 10 240 30 I am inputting the above in a simulator that simulates people in line at a store. The 3 means …

Member Avatar for Lucaci Andrew
0
80
Member Avatar for kevin.deasis.1

My problem with my TIC TAC TOE game is that it does not save end the game when someone has won if they have more than four moves. THe method of my code to check if someone has won is that it goes over a list of list. The list …

Member Avatar for woooee
0
399
Member Avatar for dean.ong.14

i want to make sure that people can quit in the middle of the game and the question is random not in order... please help me.. # make input equal to Python3 style input even in Python2 import random try: input = raw_input except: pass question =" " print("Welcome to …

Member Avatar for dean.ong.14
0
444
Member Avatar for Cosmo_Kramer

Hello all, I was just wondering if anyone has code snippet for a function that is a multi-queue.....this is for python 2.3 or 2.4 I think so it has to be a bit primitive. The program is simulating people at a store arriving at the checkout, the input from a …

Member Avatar for Cosmo_Kramer
0
209
Member Avatar for dean.ong.14

I stuck at the part about how many question they want for their game.This is the requrirement. Write a program for an application that let the user host a quiz game. The application will have a collection of questions with short answers. The program should ask the user how many …

Member Avatar for dean.ong.14
-2
172
Member Avatar for Cosmo_Kramer

So I am done with the code below, I will run it like this "python hw3.py < code.txt" I think I have a problem with the indentation or something. the code.txt has a mixed up text in it that is offset using a caesar cipher but it has to be …

Member Avatar for Cosmo_Kramer
-1
290
Member Avatar for Cosmo_Kramer

def random(fileName) setup = open(fileName, "r" ) z = setup.readline() waiting = stack() for line in setup: customerNum, arrivalTime, serviceTime = line.split() plane = Customer(customerNum, arrivalTime, serviceTime) push(waiting, plane) setup.close() print "The data file specifies a", z, "-server simulation." print "There are", len(waiting) , "arrival events in the data file." …

Member Avatar for Cosmo_Kramer
0
188
Member Avatar for MissAuditore

Hi guys, Having a bit of a problem with reading and writing to a file. I have a file that has a lot of symbolic stuff I want to remove. And get a new kinda clean file with just the numbers and names. And it finds the line where it …

Member Avatar for Lardmeister
0
230
Member Avatar for ashley9210

I am creating a bar graph essentially **just by only using the graphics module**. I am stuck with it. Below is my code that I have done which creates a perfect square. (10 x 10) so for every one bar I was it to decrease by 10. def drawRectanglePatch(win, x, …

Member Avatar for woooee
0
187
Member Avatar for krystosan

How can i locate a file or a folder using python like some when we right click in downloaded files using firefox and open containing folder,and it opens the explorer and pre selects the file downloaded. how can this functionaly be implemented using python standard library ? however this code …

Member Avatar for extr3mex
0
143
Member Avatar for mmpal78

Hi, Im new to programming and to Python. Im making a program to get weather information from online, parse it the way I want to, then have Festival read it aloud to me. I got the weather info and parsing done exactly how I want but am getting an error …

Member Avatar for mmpal78
0
267
Member Avatar for ashley9210

I am trying to make this pattern in python but stuck, any help please? Ashley http://images.colourbox.com/thumb_COLOURBOX3492089.jpg

Member Avatar for Gribouillis
0
145
Member Avatar for Melly3

` This is the code of Tic Tac Toe from Python the absolute beginner. How could I edit the global constants so the user could pick the pieces or should I just remove them all together? # global constants X = "X" O = "O" EMPTY = " " TIE …

Member Avatar for TrustyTony
0
176
Member Avatar for Frensi

I'm having a little problem. The challenge is this: "Modify the program so that different shapes are drawn at each angle rather than a small filled circle". So I'm trying to change the middle shape when the second hand hits 12, 3, 6, and 9. I've got some code, but …

Member Avatar for Lardmeister
0
158
Member Avatar for giancan

Dear members, i have a question. I created my software (with windows made with wxpython) and with py2exe I embed the icon into the exe. Since I would like to add the same icon file (or any other image) also as decoration in the window but I don't want to …

Member Avatar for Lardmeister
0
466
Member Avatar for luck12

I am trying to add collision detection to this simple game, but I am a little lost on where to begin. I know I need to use rects to do this but I am struggling to find out what I need to code to make this work. Any pseudocode or …

Member Avatar for luck12
0
1K
Member Avatar for krystosan

Today i was reading someone written code and trying to understand it, but I have encountered so many times that programmers override builtin methods or set new properties , the code below is from a tutorial i came accross , I hope some one can help me out how code …

Member Avatar for krystosan
0
169
Member Avatar for vegaseat

Let's say you have a whole bunch of nicely named lists and want to save them all and their names in a pickle file. One solution can be to store these lists and their names in a Bag container class and pickle the bag instance object. Now you can use …

Member Avatar for Lardmeister
4
238
Member Avatar for darkwing

I have a video program that use gstreamer and wxwidgets. Before Ubuntu 9.10, the program works fine. But since I upgraded to 9.10 (or 10.04), it keeps getting crashes when trying to view video. The error is usually Fatal X11 IO error. I googled and found that GTK+ implementation is …

Member Avatar for Lardmeister
0
171
Member Avatar for ohmang841

Hi guys...I'm new to python so I've no idea what I'm doing but I need to write a function that 1) asks the user how many strings they would like to input. 2)Stores the strings in a list 3) sorts the list 4) Displays the sorted list 5) Displays the …

Member Avatar for Lardmeister
0
9K
Member Avatar for krystosan

I have made a package with the name MaPySan that has `__init__.py` file and other files namely, DockedGUI.py and poseManager.py and inside `__init__.py` i have, `import poseManager` which is my app that I want to run so how should I have it run from script editor that I do not …

0
56
Member Avatar for elrond

a program that asks user to enter number of people their birth year date and month and sorts it i got the algorithm figured out its just the code thats not hitting me!

Member Avatar for Lardmeister
-1
124
Member Avatar for BigPaw

Which is the most popular editor on these forums, please? Especially so, an editor that takes Python to the maximum of what it is capable of achieving. I'm hoping that I won't need such-and-such an editor to do this, and such-and-such an editor to do that... An all-in-one if possible. …

Member Avatar for Lardmeister
0
267
Member Avatar for Vusumuzi

Question Enter a code that will test if player 'A' for team A or 'B' for team B was entered Call the procedure display_player( , ) with the relevant variables Enter the code that request the user to enter the positon My failes answer is: def diplay_player(team, position): team = …

Member Avatar for Vusumuzi
0
153
Member Avatar for Monster Killer

Hello. I have a python script to post news a website but i want to know how i can pass variables from php to the python script and run the script from php. Python script: (I didn't create this, was done by a friend) [CODE] import urllib2, urllib USER = …

Member Avatar for Padiamon
0
8K
Member Avatar for nnekymoe

Hi:) Would any of you know how to solve one of the following problems? I dont't care which one!! 1. Write a program that reads in student marks until –1 is entered then display the highest mark, the lowest mark, and the class median. 2. Setting up matches for a …

Member Avatar for <M/>
-2
304
Member Avatar for ashley9210

![image_(2)](/attachments/small/4/image_(2).jpeg "align-left") ![image_(2)](/attachments/large/4/image_(2).jpeg "image_(2)") Hi There, I'm having a problem looping text I have attached an image of what I want. Thanks in advance, Ashley def drawPatch(win, x, y, colour): for i in range(5): for j in range(5): topLeftX = x + i * 20 topLeftY = y + j …

Member Avatar for woooee
-1
92
Member Avatar for ashley9210

Hi there, I am trying to repeat my triangle on 100px by 100px; Any help is much appreciated. Many thanks, Ashley def drawTrianglePatch(win, x, y, colour): for i in range(5): for j in range(5): if (i + j) % 2 == 0: triangle = i * 20 triangle = y …

Member Avatar for woooee
0
492
Member Avatar for biscayne

When trying to load csv file data into Scribus it only takes the data of the last row. I'm using ScribusGenerator.py by Ekkehard Will and my best guess is that the cause of the problem is somewhere in this part of the code: def replaceVariablesWithCsvData(self, headerRow, row, lines): # lines …

Member Avatar for biscayne
0
2K
Member Avatar for krystosan
Member Avatar for krystosan
0
141

The End.