Last Updated: February 25, 2016
·
452
· idevy

How much percent is every human watermelon

Picture

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)]