1. ronald martinez
  2. play-problems

Source

play-problems / problema07.py

import random


def run():

    total = 1000
    points = (50, 50, 50, 100, 100, 100, 150, 150, 150, 100)
    n1 = random.randint(1, 101)

    for x in points:

        n2 = int(raw_input('Enter number:'))

        if n1 == n2:
            print total
            break
        else:

            if n1 < n2:
                print 'el numero es menor que %d' % n2
            else:
                print 'el numero es mayor que %d' % n2

            total -= x

    print total

if __name__ == '__main__':

    run()