import random
start = input('請決定隨機數字範圍開始值: ')
end = input('請決定隨機數字結束值:')
start = int(start)
end = int(start)

r = random.randint(start, end)
count = 0 

while True:
	count += 1 #count = count + 1
	num = input('請猜數字: ')
	num = int(num)
	if r == num:
		print('你猜對了!', '這是你猜的第', count, '次')
		break
	elif r < num:
		print('你猜得比較大')
	elif r > num:
		print('你猜得比較小')
	print('這是你猜的第', count, '次')