15,192 Topics

Member Avatar for
Member Avatar for lrh9

Is it a good idea to help people with object oriented software design and code? I'm asking this because most of the code here is written using the functional programming, and all could probably improve a little or a lot with object oriented design and coding. My first doubt about …

Member Avatar for Gribouillis
0
94
Member Avatar for Gribouillis

Does anyone know how I can test if an object's type is a builtin type or a user defined type ?

Member Avatar for Gribouillis
0
167
Member Avatar for OldGrantonian

As an amateur weekend programmer, I find that the easist way to learn how a program works is to step through the program using my IDE debugger. Using breakpoints is obviously the best way to step over code that doesn't interest me. My problem is that in some large programs, …

Member Avatar for OldGrantonian
0
81
Member Avatar for rociel

Hello, I am trying to make a program to calculate the payment for a babysitter like this: A babysitter charges $5 an hour until 9:00 p.m., at which point the rate drops to $3 an hour because the kids are in bed # the start and end times are in …

Member Avatar for snippsat
0
502
Member Avatar for alxw1711

Hello, I am fairly new to python and in process of taking a class on Natural Language Processing and the language itself. I would sure appreciate any help at all on this current assignment. I'm having trouble trying to understand how I should start this program or how it all …

0
42
Member Avatar for Stefano Mtangoo

Hi All, I'm curious to know what is the difference as well as recommendation for two beasts :) Is it Panda or Pygame and why?

Member Avatar for Stefano Mtangoo
0
128
Member Avatar for kiddo39

I have an array of numbers and want to print out how many of each number there are in the array. My method works but I was wondering what a more efficient way of doing this would be. I figure a loop would work but I haven't figured out how …

Member Avatar for kiddo39
0
117
Member Avatar for denniskhor

The modification code that i wan is: When: m = "i wan do something" i need a modification code when get m result... the code will automatic modify it become: "i[B]\\[/B] wan do [B]\\[/B]something"

Member Avatar for lukerobi
0
78
Member Avatar for redpython

Hi all – I am running Python 2.6.2 in a Windows XP Pro environment. I am trying to write my first python/cgi script combo and they must execute on a Linux websever. After surfing the web I realize that MS-DOS and Unix systems use different methods to identify end-of-line information …

Member Avatar for redpython
0
137
Member Avatar for lakshaypandey

I want to kno whether you can control an inpput by time in python. whether i can have a function which checks time n if input not given in that time then moves on?

Member Avatar for masterofpuppets
0
61
Member Avatar for djames101010

I'm trying to read dynamically generated data from a website (it's being generated by javascript linked to server-side code, so i can't read the data from the html file returned by urllib). Is there a way to do this in python? Would using firefox macros be easier? Thanks for any …

Member Avatar for ov3rcl0ck
0
76
Member Avatar for tomtetlaw

I am wanting to create a program that everytime I run it, it gets the current playing tune in iTunes, and sets this as my Facebook status: "I'm listening to current_playing_song, corrent_artist." I have no idea how to start. can someone suggest how?

Member Avatar for ov3rcl0ck
0
109
Member Avatar for mahela007
Member Avatar for PixelHead777

I'm looking for some major help. I'm a decently new coder, taking a Python class independent study. I was writing a program for a two-player 21 game. (Like blackjack only I start with only one card... for some reason.) Only problem is, while the code doesn't seem to contain any …

Member Avatar for PixelHead777
0
205
Member Avatar for Ene Uran

I have two similar lists and want to create a new list with just the differences between the two. Is there an existing function or do I have to iterate with a for loop?

Member Avatar for Gribouillis
0
2K
Member Avatar for saikeraku

Hi, I want to make a program that can make asterisks around the text, so the output is something like this: Enter string: Hello World ************* * Hello World * ************* I do not want to use the multiplication technique (ex: "*" * 5), and I want to try using …

Member Avatar for marecute
-1
109
Member Avatar for james27

hello, i have some form which split by iframe. subject field is no probelm ,but content field was come from another iframe source.. so i can't input text in content's field.. im using PAMIE and win32com module.. i have to put text in 'contents.contentsValue' here. but i have no luck..anyone …

0
99
Member Avatar for CurtisEClark

I am building a code that needs to find the average of a set of scores in a list that can have amounts added and removed. I know how to find the average of a list of scores of a fixed number can someone help me on how to find …

Member Avatar for CurtisEClark
0
136
Member Avatar for lrh9

I always wondered how a programmer could efficiently generate a random number from a set* of numbers once and only once. I quickly realized the inefficient solution. Simply generate the number and if it equals one you have all ready generated then regenerate the number. Regenerating the number is a …

Member Avatar for lrh9
0
377
Member Avatar for masterofpuppets

A simple function to return the number of occurances of a letter in a text. An easier way to implement this would be by using a dictionary :) P.S sorry if there already is a code snipped like that somewhere.

Member Avatar for lrh9
1
763
Member Avatar for AutoPython

I can't find a simple command that does this. If there's no command that does this I'm going to spam python.org until they finally agree to put this in the next version of python.

Member Avatar for bumsfeld
0
170
Member Avatar for xaeubanks

I'm writing code in python for a tic tac toe game. I have ran into a problem. can any one help me out. thanks # TIC TAC TOE # Started: 10/19/09 # Ended: still in progress #GLOBAL CONSTANTS X = "X" O = "O" Empty = " " TIE = …

Member Avatar for bumsfeld
0
134
Member Avatar for simpatar

I've got a book for python 2. in school and the problem is that we're programming in 3. which makes it difficult from time to time to get it right, cause you cant just copy the text in the book to the shell. I'm stuck with this ex: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # …

Member Avatar for bumsfeld
0
266
Member Avatar for Gribouillis

This snippet shows a fast and efficient way to cut strings in substrings with a fixed length (note that the last substring may be smaller).

Member Avatar for bumsfeld
1
617
Member Avatar for srk619

i need to write code for two "robots" that will chase each other around the screen. im stuck on a command which is the step(x,y) command which take the (x,y) coordinates of the other robot as a parameter which should just contain "pass" and will be overridden by the subclass. …

Member Avatar for jlm699
0
99
Member Avatar for Kruptein

with the function: list(string) you put every letter from the string in a list, I want to put each 2 letters in a list so If I had the string: ThisIsATestt I want to get a list: ['Th','is','Is','AT','es','tt'] (There will never be a letter alone, so you don't have to …

Member Avatar for jice
0
99
Member Avatar for Snake Hunter

Do you use or abuse list comprehensions? Do you recognise a duck when you see one? Do you unpack when you start assignments? I'm looking to connect with raw 'professionals' but exceptionally talented coders with good academics and who know Python inside out. The company are one of the fastest …

0
41
Member Avatar for rociel

Hello, I'm trying to create a program that calculates the hypotenuse and area of a right triangle. I need to round the hypotenuse to 2 places after the decimal, and one place for the area However, I can't seem to get it to work If I tried c = int(round(math.sqrt(a**2) …

Member Avatar for rociel
0
276
Member Avatar for srk619

how do you write a command that turn left or right at an angle in a superclass is it like this: def left(self): self.position += self.angle return (self.position) its part of Object oriented Python

Member Avatar for vegaseat
0
82
Member Avatar for jmark13

I've gotten some great responses to my questions here, so I'm really grateful for this resource of programmers on this website. I've been working on an algorithm and am almost completed with it, but I'm finding out the very last steps are the most difficult for me because they require …

Member Avatar for masterofpuppets
0
108

The End.