#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 21 19:32:09 2017

@author: Diane
"""
#Create random number
import random
secret_number = random.randint(1,100)
attempts = 0


#Create while loop
while attempts < 10:
    print("Guess a number")
    guess = input()
    guess = int(guess)
    attempts = attempts + 1
    if guess < secret_number:
        print("your guess is low")
    elif guess > secret_number:
        print("your guess is high")
    elif guess == secret_number:
        break

if guess == secret_number:
    print("you guessed right!")
if guess != secret_number:
    print("you lose!")