User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 363,779 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,484 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:
Contribute Code
This is a test to get the Python snippets going! For those of you who are scared of snakes, the language is named after the TV program, not the snake. Python is an interpreted language, but programs to compile/combine the code to an exe file are available (Py2Exe). The latest version of Python... (View Snippet)
Yes, you can let your computer read text to you. The task is relatively easy, if you have Windows on your machine. All you need is Microsoft's speech-API SAPI, the Python Text to Speech module pyTTS, and an updated version of win32com, all free downloads. Here are some experiments with the pyTTS... (View Snippet)
Early versions of Python used a hybrid of samplesort (a variant of quicksort with large sample size) and binary insertion sort as the built-in sorting algorithm. This proved to be somewhat unstable, and was replaced in version 2.3 with an adaptive mergesort algorithm. I am comparing several... (View Snippet)
The FlashWindow component of wxPython will play those nice animated flash files found on the internet. They have file extension .swf usually. (View Snippet)
This simple isprime(number) function checks if the given integer number is a prime number and returns True or False. The function makes sure that the number is a positive integer, and that 1 is not considered a prime number. (View Snippet)
If you are on school and you are taking algebra like me or just want to find the missing length of one side of the triangle than this program should help you out. Pythagorean Theorem Calculator is great and extremely essay to use thanks to this little program I pass my final exam. (View Snippet)
This is an application of the Python Image Library (PIL) and shows you how simple it is to do pixel math on an image. (View Snippet)
The code shows a fast prime number generator using a sieve algorithm. It looks at only odd numbers. Technically 1 and 2 are prime numbers too, since they are only divisible by unity and themselves, exceptions are made for 1 and 2. Zero and negative numbers return an empty list. Note: The official... (View Snippet)
Python24 introduces the function decorator that lends itself nicely to the timing of a function. As a sample function we are using the ever popular and rather stodgy prime number generator. The prime number generator seems to exist only to fluster students and to make niggling comparisons of the... (View Snippet)
For those of you who are inquisitive, here is a little Python program to approximate the value of pi to 77 digits. You can easily go further, just change the value n in range(n+1). (View Snippet)
Contribute Code
All times are GMT -4. The time now is 10:36 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC