Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addition = 0
- total = 0
- while True:
- data = float(input())
- if data >= 0 and data <= 10:
- addition += data
- total += 1
- else:
- print("nota invalida")
- if total == 2:
- average = addition / total
- print("media = %.2f" % average)
- break
Advertisement
Add Comment
Please, Sign In to add comment