How much percent is every human watermelon
a = [80, 87, 90, 90, 93, 97, 99]
median=sorted(a)[len(a)/2]
print 'Values for watermelon water percentage'
print a
print 'Median among all:'
print median
print 'Control median:'
b = sum(a)
c = len(a)
print 'sum:', b, 'numbers:', c
print 'Exact median:', float(b)/float(c)
print 'How much percent is every human watermelon:', 80.0/90.0*100.0
# bonus level
subj = 'watermelon'
print 'Subject length:', len(subj)
print 'Human might also be:', subj[0:int(90.0/100.0*10)]
Written by iDevy
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#