Prove Einstein was right!

Hooked into python lately, without much hands on.
Thought of writing an ultra simple module, to help experimenting whether Einstein was right or wrong!

Watch this video if it sounds greek.

I named it ‘syncme’.

Code:

"""
A game that proves quantum theory is correct, infact! - @author joe
"""
from datetime import datetime
## global variable rec_t3
def syncme_rec():
    print "time now is :", datetime.now()
    """ Takes two imput values from user and records time        
    """
    print "=================================="
    input1 = raw_input("To start,tap enter:")
    t1 = datetime.now()
    print "Good Job, tap enter again:"
    input2 = raw_input()
    t2 = datetime.now()
    global rec_t3
    rec_t3=t2-t1
    print "=================================="
    print "Great the frequency is :", rec_t3
    ch = raw_input("Dare to play? y/n")
    if ch=='y':
        syncme_play()
    else :
        exit()
def syncme_play():    
    print "ready to play syncme! Good luck!"
    print "The required frequency is :",rec_t3 
    print "=================================="
    input1 = raw_input("tap enter to start:")
    t1 = datetime.now()
    print "Good Job, tap enter again:"
    input2 = raw_input()
    t2 = datetime.now()
    act_t3 = t2-t1
    print "=================================="
    print "Great! the frequency is :", act_t3
    if act_t3==rec_t3:
        print "Hey, you won, Einstein was right!"
    else : 
        ch = raw_input("Thus proved that Quantum mechanics is correct!, Dare again/record again/no? 1/2/* : ")
        if ch=='1':
            syncme_play()
        else:
            if ch=='2':
                syncme_rec() 
            else:
               exit() 
if __name__ == "__main__":
        syncme_rec()

If you can completely synchronize with your previous attempt(Ofcourse thats pretty tuff!), you can be proud that world is not in the clutches of probability!

Advertisements

Speak:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s