Advertisement
Guest User

eval

a guest
Jan 28th, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. import statistics
  2.  
  3.  
  4.  
  5.  
  6.  
  7. def main():
  8.  
  9.     number = input(" Give a positive number or numbers separated by comma! ")
  10.     userList = eval(number)
  11.     minim = str(min(userList))
  12.     maxim = str(max(userList))
  13.     mvalues = statistics.mean(userList)
  14.  
  15.    
  16.    
  17.     print  ("You gave " , userList,  " max value is " , maxim, "min value is", minim , "mean is" ,mvalues,  )
  18.  
  19.  
  20.  
  21. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement