# Getting back in touch with probabilities

###### Posted by: Mihai Oprea 6 months ago

Recently I stumbled upon a problem on stackoverflow.com which roughly translates to this:

You have a function F1 which returns True with probability P. Build another function F2 that uses F to return True with probability 1/2.

The solution is rather nice and clean :

`F2():   result1 = F1()   result2 = F1()   if result1 = True and result2 = False: return True   elif result1 = False and result2 = True: return False   else:  F2()`
I leave it for a further edit of this post to include the generalization of F2 for returning True with probability 1/N.

Currently unrated

• Mabelagec 2 months, 4 weeks ago

ing an activity or event, that event performing being shared online. There are various websites online that offer fans an on the spot feed into live NBA television broadcasting and in addition live NBA games..

Wall missed the best 33 games of year with a stress problems his left knee and struggled along with his jump shot and turnovers. He could be averaging 15.6 points, 7.5 assists 3.5 rebounds per game and shooting a careerhigh 44.4% out of your field. His overall threepoint average still lags at 29.2%..

Practice is
<a href="http://www.glenviewestates.com">cheap michael kors</a>

ï»¿<a href=http://www.excelsisvirtual.net/history.php>michael kors outlet</a>

Currently unrated

• Mayagegc 2 months, 3 weeks ago

Gamecocks rally from six runs because of defeat the Razorbacks while travelling on Friday night.

I was there opening day for all the ones you mentioned having said that i am now officially a hater with no desire to see Clone Wars during the theater. He can't write that's that. What needs to have been one of the important aspects of Indy IV is definitely the relationship and banter between Indy and Marion.

However the victim sustained serious injuries, they weren't considered life threatening. Based upon the emergency need
<a href="http://code.google.com/p/michael-kors-sale/">michael kors bags on sale</a>

Currently unrated

• Mabelagec 2 months, 4 weeks ago

coach who served in that particular capacity inside the Olympics. "I'm not planning to tell you I knew she was going to win, nonetheless i knew all along she had a possibility of win. I told her13 months prior to Olympic Gamesright after she'd a very, very disappointing race.".

"It's not allowed by our standards."While you will find a mechanism to request a therapeuticuse exemption for horses equally for humans, veterinarians probably wouldn't allow an animal to compete in the event it needed an antibleeder medication, and the breathing medi
<a href="http://5estonetarot.com">michael kors factory outlet</a>

<a href=http://www.michaelkorsfactory4sale.com>http://www.michaelkorsfactory4sale.com</a>

Currently unrated

### New Comment

required
required (not published)
optional