This is the solution of this problem in python: X=float(input())while (X<0 or 10<X): print("nota invalida") X=float(input())Y=float(input())while (Y<0 or 10<Y): print("nota invalida") Y=float(input())avarage=(X+Y)/2print("media = %.2f"%avarage)
No comments