Please support our Python advertiser: Programming Forums
Views: 63237 | Replies: 175
![]() |
Let's assume you are working for the NSA and wanted to use Python to profile large amounts of e-mail that you are intercepting.
Write three fictitious e-mails, one a business e-mail, one a love/romance e-mail and one e-mail from Ladun Bing Osman to an accomplice that threatens your country.
Now use Python's text handling prowess to profile the three letters, so the dastardly letter can be identified. Check if fragments of words can do this.
Note: As of this time there are over 10 billion (yes, billion!) e-mails each day worldwide. Would be tough to read them all in person! To this you can add about 15 billion spam e-mails!
Write three fictitious e-mails, one a business e-mail, one a love/romance e-mail and one e-mail from Ladun Bing Osman to an accomplice that threatens your country.
Now use Python's text handling prowess to profile the three letters, so the dastardly letter can be identified. Check if fragments of words can do this.
Note: As of this time there are over 10 billion (yes, billion!) e-mails each day worldwide. Would be tough to read them all in person! To this you can add about 15 billion spam e-mails!
Last edited by vegaseat : Feb 13th, 2006 at 2:12 pm.
May 'the Google' be with you!
Design a text driven adventure game. Draw a map with features like meadows, woods, mountains, rivers, lakes, caves, cottages and such. You know the map, the player does not! Start in the center and give a description in all directions.
Ask the player which direction she/he wants to go (E,W,S,N). Keep descriping the new environment according to your map and ask player for directions to go.
The goal is to find a treasure hidden somewhere on the map(give hints on how close the player is) and then find the way back to the start. Hopefully the player can remember some of the more distinctive features along the path taken.
Ask the player which direction she/he wants to go (E,W,S,N). Keep descriping the new environment according to your map and ask player for directions to go.
The goal is to find a treasure hidden somewhere on the map(give hints on how close the player is) and then find the way back to the start. Hopefully the player can remember some of the more distinctive features along the path taken.
•
•
Join Date: Aug 2005
Location: England - York
Posts: 136
Reputation:
Rep Power: 4
Solved Threads: 9
hehe bumsfeld, sounds like a MUD your describing there 
i got one for all you maths nuts out there...
re-invent the wheel!!!!
well not quite, the challenge is quite simple, make an algorithm or function or whatever that returns the square root of any number, WITHOUT USING ANY INBUILT SQUARE ROOT FUNCTION!!!!!
so essentially, re-invent the wheel.:mrgreen:
have fun guys,
a1eio

i got one for all you maths nuts out there...
re-invent the wheel!!!!
well not quite, the challenge is quite simple, make an algorithm or function or whatever that returns the square root of any number, WITHOUT USING ANY INBUILT SQUARE ROOT FUNCTION!!!!!
so essentially, re-invent the wheel.:mrgreen:
have fun guys,
a1eio
Looking around the internet, I haven't found a nice hangman game yet written in Python. You can use a simple ASCII character graphics or go fancy with a GUI drawing canvas (Tkinter or PyGame). Might even be able to use a chopped up image and hang your less favorite politician or used car dealer.
May 'the Google' be with you!
An electronic version of an Index Card File would be interesting, like a collection of recipes for cooking. You could search quickly using a limited set of keywords/titles, or slower using the general text of each card.
If you want to be fancy, you can add a feature to cook for two people, five people or even 12.
If you want to be fancy, you can add a feature to cook for two people, five people or even 12.
drink her pretty
Create a number to word converter, you type in a number like 1776 and your program returns the number spelled in words (English or whatever language you like). Should be a simple project and a good exercise for your Python skills.
For an additional challenge, could be expanded to spell out something like $1,545,299.45!
Just to help you out with the somewhat larger numbers, here is some Python help ...
Click on "Toggle Plain Text" so you can highlight and copy the code to your editor.
For an additional challenge, could be expanded to spell out something like $1,545,299.45!
Just to help you out with the somewhat larger numbers, here is some Python help ...
python Syntax (Toggle Plain Text)
# english words for multiples of thousand thousands = [ "thousand", "million", "billion", "trillion", "quadrillion", "quintillion", "sextillion", "septillion", "octillion", "nonillion", "decillion", "undecillion", "duodecillion", "tredecillion", "quattuordecillion", "sexdecillion", "septendecillion", "octodecillion", "novemdecillion", "vigintillion"] t = '1,000' for s in thousands: print "%-18s %s" % (s, t) t += ',000'
Last edited by vegaseat : Mar 1st, 2007 at 4:19 pm. Reason: code=python remark
May 'the Google' be with you!
Just a silly program, take a text and reverse the starting and ending letter of each word (having 2 letters and more), then see if you can still read it. Test it on your friends. Don't overdo it, or you will not have any friends left!
If you can read that result easily, go on and reverse the first two with the last two letters of each word (4 letters and above). Or reverse letters 1 and 2, you get my drift. How far can you go and still read the text? Maybe you can scramble your next e-mail that way, it would make it harder for the government to read it.
If you can read that result easily, go on and reverse the first two with the last two letters of each word (4 letters and above). Or reverse letters 1 and 2, you get my drift. How far can you go and still read the text? Maybe you can scramble your next e-mail that way, it would make it harder for the government to read it.
May 'the Google' be with you!
Make a Molecular Weight calculator. The user enters for instance the formula for salt NaCl and the program looks up the atomic weight of sodium and chlorine and adds them up.
A dictionary with element:weight pairs would make it easy. You also have to design some kind of parser that figures out molecules like water H2O. Here you have to add up hydrogen twice and oxygen once.
Things get a little more challenging for the parser with toluene, since the user could enter C7H8 or C6H5CH3. Elements like silicon Si have to be entered that way and not as SI, since your parser would look at it as a combination of sulfur S and iodine I.
Since the right data is already there, you can expand the program to do elemental analysis, giving the percent of each element in the formula. Happy coding!
A dictionary with element:weight pairs would make it easy. You also have to design some kind of parser that figures out molecules like water H2O. Here you have to add up hydrogen twice and oxygen once.
Things get a little more challenging for the parser with toluene, since the user could enter C7H8 or C6H5CH3. Elements like silicon Si have to be entered that way and not as SI, since your parser would look at it as a combination of sulfur S and iodine I.
Since the right data is already there, you can expand the program to do elemental analysis, giving the percent of each element in the formula. Happy coding!
drink her pretty
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode