while True:
fraction = input("Fraction: ")
try:
x, y = fraction.split("/")
x, y = int(x), int(y)
if y == 0 or x < 0 or y < 0: #here is where you in put you negative fraction factor
raise ValueError("Invalid input")
percent = x/y
if percent<= 1:
break
except (ZeroDivisionError, ValueError):
pass
percent = percent * 100
percent = round(percent)
if percent <=1:
print("E")
elif percent >= 99:
print("F")
else:
print(f"{percent}%")