No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
14 Posted Topics
Re: A similar thing has been done before, met with various legal successes by Apple. There have been a handful of programs which convert it from the fairplay format into a raw or .wav format. The main diference is that what Jon here has done is reverse engineered it so other … | |
Re: I'm not sure what you're trying to do, but this is how you can define an input statement inside of a function: [code=python] def question(q): #Bassiccly, you are setting the variable 'response' to whatever the user types in response = raw_input(q) print "your reponse from inside the function:", response return … | |
Hi! Haven't posted on danniweb for awhile, but I'm hoping I can get some help. I am in the middle of learning Java, which will be my second language after python, and I have come across a problem, ordering a list of integers in an array. In python, there's a … | |
Re: Python [php] def counting(i=0): while i < 11: print i, i += 1 counting() [/php] | |
Re: I don't have much time, so I can only really post this much. Take a look at Mouche's scheduling program: [PHP] def add_address(self): try: self.address = schedule_data[0][3] except IndexError: pass try: self.city = schedule_data[0][4] except IndexError: pass try: self.state = schedule_data[0][5] except IndexError: pass try: self.zip = schedule_data[0][6] except IndexError: … | |
Re: For and While loops serve different functions, you can actually make a For loop using a while loop (though I don't reccomend it.) Here's a useful function for text-based games: [php] def ask_yes_no_question(question): """Asks a yes or no question for the user""" response = "None" while response not in "yn": … | |
![]() | Re: Another possible challenge, have it able to access a text file from the computer containing a bunch of possible words, so the user can add their own if they wish. |
![]() | |
Re: What do you mean by [inlinecode]denaylogged()[/inlinecode]? Is that a function you defined earlier? ![]() | |
Re: In this case, a module such as tkinter would be much more useful since it doesn't contain any animation. TKinter is probably your best bet, sicne you can create a simple GUI interface for the whole program with it. I'm guessing you're trying to create a blackjack game, correct? Instead … | |
Re: A traceback error is simply a diagnostitic tool to see where something went wrong in your program. It shows the last three or so lines executed before the error occured. It's important to realize that python does not execute straight from top to bottom, it jumps around the place when … | |
![]() | Re: Tuples are great for constants because you won't accidently change them, they're also faster and use less space then lists, iirc. |
Re: Will this work? [quote=vegaseat;246557]The following little Python code will bring up your default webbrowser and connect it to the given URL ... [php]import webbrowser # you have to be connected to the internet # supply a URL of your choice webbrowser.open('http://www.python.org/') [/php][/quote] | |
![]() | Re: [quote=LaMouche;268310]Thanks a lot. Could you explain this part a bit more? [php] # past the limit start with 'a' if x <= limit: ascii_val = ord(c) + rot else: ascii_val = ord(c) - rot [/php] I understand that ord() gets you the ascii value, but I'm not understanding the logic … |
The End.