Friday, 29 April 2016

35. pre-Cognition (Expanded)

#Pre-cognition

# Import the modules
import random

a=0
b=0

while True:
    print ('')
    print ('Think of a number from 1 to 9  ##########################')
    ANS = int(input())
    answers = random.randint(1,9)

    if ANS == answers:
        a=a+1
       
    elif ANS != answers:
        b=b+1

    print (' aleatorial bot says: ')
    print(answers)    
    print ('')
    print ('ATTEMPTS /20 : ')
    TOTAL = a+b
    print (TOTAL)
    print ('')
    print ('YES:')
    print (a)
    print ('NO:')
    print (b)
    print ('')
   
TOTAL = a+b
    YOURSCORE = (a/TOTAL)*100
    print('YOUR SCORE as % is :')
    print (YOURSCORE)

    if YOURSCORE <=11.11:
        print ('Pre-Cognition level = 0/9')
    elif 11.11 < YOURSCORE <=22.22:
        print ('Pre-Cognition level = 1/9')
    elif 22.22 < YOURSCORE <=33.33:
        print ('Pre-Cognition level = 2/9')
    elif 33.33 < YOURSCORE <=44.44:
        print ('Pre-Cognition level = 3/9')
    elif 44.44 < YOURSCORE <=55.55:
        print ('Pre-Cognition level = 4/9')
    elif 55.55 < YOURSCORE <=66.66:
        print ('Pre-Cognition level = 5/9')
    elif 66.66 < YOURSCORE <=77.77:
        print ('Pre-Cognition level = 6/9')
    elif 77.77 < YOURSCORE <=88.88:
        print ('Pre-Cognition level = 7/9')
    elif 88.88 < YOURSCORE <=99.99:
        print ('Pre-Cognition level = 8/9')      
    elif YOURSCORE ==100:
        print ('Pre-Cognition level = 9/9. Perfection')

    if TOTAL == 20:
        print ('thank you')
        break