#coding:utf-8
#loop ループ
#繰り返し文while
import os
import random
os.system("clear")
#数あて Number guessing
x = random.randint(1,99)
y = int(input("1-99までの数字を当ててみよう: "))
cnt=0
while True:
cnt+=1
if x == y:
print(f"\n {cnt}回で的中。乙ニダ")
break
elif x < y:
print("はずれ!大きい \n")
else:
print("はずれ!小さい \n")
y=int(input("次の数字:"))
if cnt == 1:
print("運良すぎるだろ!!")
elif cnt >= 2 and cnt <=4:
print("頭ええですやん")
elif cnt >= 5 and cnt <=8:
print(" 平均値っすわ")
else:
print("ド下手だね!!")