I Am Bored

Loads of viral videos, games, memes, lists and social networking for when you're bored. Updated every day, so visit often.
Latest Popular Most Bookmarked Most Emailed Top Rated My Favorites Random Chat
All Games Funny Entertainment Quizzes Weird Tech Lifestyle, Arts & Lit. News & Politics Science Sports Misc
T-Shirts   Submit Content  

The Python Challenge

Click Here to Launch:



The Python Challenge
(Will open in new window or tab)
submitted by: buddy
< Back Next >
One of these URL fabrication games like Not Pron but with a programming twist.
+ Add to Favs
View/Add
Hits: 10583 | Favorites: 10 | Emailed: 0 | Rating: 2.3 | Category: Games | Date: 06/01/2005
 
 popular today
Sexy Young Asian Rips Her Top Off [Gif] Now I feel ripped off.
10 Signs We Are Headed Into World War III [Pix] Where is this world going?
6 RECENT Spine Chilling Ghost Sightings [Pix] Okay that last one gave me goosebumps. Can anyone explain that one? I BELIEVE.
11 Places Where Sex Is Never Really Safe [Pix] Safe sex, usually means protecting yourself against stds, but for these people it is about not dying during the act.
20 Seriously Creepy Photobombs [Pix] *Salts the windows. *Draws the circles. *Loads the guns. Okay, I`m ready. Bring it.
More Comments >

314159
Male, 18-29, Europe
 19900 Posts
Sunday, September 24, 2006 9:06:05 AM
Again using very clunky code I've managed to get through 2, finding the rare letters. Again I think it`s something you could do by hand, laboriously.

Now for 3.


314159
Male, 18-29, Europe
 19900 Posts
Saturday, September 23, 2006 10:18:33 PM
And I've also solved the next one, the maketrans one, but I didn`t know how to use maketrans, so I wrote some of the most clunky, inelegant code ever, quite possibly, but it got the job done.

Of course, you can simply do it by hand, but it`s not really the point.

Onwards to Q2!


314159
Male, 18-29, Europe
 19900 Posts
Saturday, September 23, 2006 9:04:11 PM
Ah. the easy way:

>>> 2**38

Or, alternatively,

>>> pow(2, 38)


314159
Male, 18-29, Europe
 19900 Posts
Saturday, September 23, 2006 8:56:19 PM
I've stared to fiddle with Python (no that`s not a euphemism, get your mind out of the gutter).

I`ve not figured out how to get `to the power of`, given that I`ve been doing it for about five minutes, but here`s my first attempt which solves the first one.

(And yes, I know you can just do it on a calculator, but I`m entering into the pythin spirit)

>>> a, b = 2, 38
>>> while b > 0:
print a
print b
a, b = a*2, b-1


314159
Male, 18-29, Europe
 19900 Posts
Saturday, September 23, 2006 8:14:11 PM
This is a serious puzzle right here.

To save a lot of people the trouble, there's no real point in just copying the answers from a spoiler page, and you`re unlikely to get anywhere if you can`t write programs, if not in python, at least in some language.

This should be a good little challenge, I think.


More Comments >
 


Bored | Suggest a Link | Contact I Am Bored | About I Am Bored | Link to I Am Bored | Live Submission | Privacy | TOS | Ad Choices | Copyright Policy |
© 2014 Demand Media, Inc. All rights reserved.