namereq

Untitled

Jun 7th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import math
  4. namelist = ['a','b','c']
  5. values = []
  6. for name in namelist:
  7.     value = input(name + "君の点数[点]:")
  8.     values.append(int(value))
  9.  
  10. print("3人の最高点数:" + str(max(values)))
  11. print("3人の最低点数:" + str(min(values)))
  12. print("3人の合計点数:" + str(sum(values)))
  13. print("3人の平均点数:" + str(math.floor(sum(values)/3*100)/100) )
Advertisement
Add Comment
Please, Sign In to add comment