Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n=int(input())
- p1=0
- p2=0
- p3=0
- p4=0
- p5=0
- for number in range(1, n+1):
- current_num=int(input())
- if current_num<200:
- p1+=1
- elif current_num>199 and current_num<400:
- p2+=1
- elif current_num>399 and current_num<600:
- p3+=1
- elif current_num>599 and current_num<800:
- p4+=1
- else:
- p5+=1
- print(f"{p1/n*100:.2f}%")
- print(f"{p2/n*100:.2f}%")
- print(f"{p3/n*100:.2f}%")
- print(f"{p4/n*100:.2f}%")
- print(f"{p5/n*100:.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment