Re: [Tutor] Working collaboratively

2015-10-20 Thread Alex Kleider
On 2015-10-20 01:02, Alan Gauld wrote: On 20/10/15 07:33, Alex Kleider wrote: Look closely at what the return value is called in each case. And see how it compares to the names in the signature. OOPS! Should have run over them with diff _before_ posting rather than after. Sorry about that. A

Re: [Tutor] Help with return results statement.

2015-10-20 Thread Alan Gauld
On 20/10/15 12:29, Vusa Moyo wrote: Hi there. My script is as follows, alice = { "name": "Alice", "homework": [100.0, 92.0, 98.0, 100.0], "quizzes": [82.0, 83.0, 91.0], "tests": [89.0, 97.0] } # Add your function below! def average(numbers): >total = sum(numbers) >

Re: [Tutor] Help with return results statement.

2015-10-20 Thread Steven D'Aprano
Hi Vusa, and welcome. On Tue, Oct 20, 2015 at 01:29:59PM +0200, Vusa Moyo wrote: > Hi there. My script is as follows, [...] > def get_class_average(students): > results = [] > for a in students: > b = int(get_average(a)) > results.append([b]) > return results I'

[Tutor] Help with return results statement.

2015-10-20 Thread Vusa Moyo
Hi there. My script is as follows, lloyd = { "name": "Lloyd", "homework": [90.0, 97.0, 75.0, 92.0], "quizzes": [88.0, 40.0, 94.0], "tests": [75.0, 90.0] } alice = { "name": "Alice", "homework": [100.0, 92.0, 98.0, 100.0], "quizzes": [82.0, 83.0, 91.0], "tests": [89.

Re: [Tutor] Working collaboratively

2015-10-20 Thread Alan Gauld
On 20/10/15 07:33, Alex Kleider wrote: The output of pydoc for Path.samefile currently reads pathlib.Path.samefile = samefile(self, other_path) Return whether `other_file` is the same or not as this file. pathlib.Path.samefile = samefile(self, other_path) Return whether `other_path`