Skip to content

Instantly share code, notes, and snippets.

@LizardLeliel
Last active August 29, 2015 13:59
Show Gist options
  • Save LizardLeliel/10560652 to your computer and use it in GitHub Desktop.
Save LizardLeliel/10560652 to your computer and use it in GitHub Desktop.
Dalhousie Problem Letter D.
#This is from Dalhousie Univerisity's programming competition, problem letter D.
#It was the easist. There were 7 lines of input. I was suposed to print the average of the highest 6 values,
#with the output formatted to four decimal places.
#Due to its brevity, I haven't code commented it.
a = []
for each in range(7):
a.append(float(str(raw_input())))
a.remove(min(a))
b = (sum(a))/len(a)
print("{0:.4f}".format(b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment