[Tutor] Python code
Danny Yoo
dyoo at hashcollision.org
Wed Nov 2 00:58:08 EDT 2016
On Nov 1, 2016 4:57 PM, "Haley Sandherr" <haleysandherr at gmail.com> wrote:
>
> Hello, I am new to python and need help with this question:
>
> Compose a function odd ( ) that takes three bool arguments and returns
True if an odd number of arguments are True and False otherwise.
Do you understand all of the terms in the question? Are there terms in the
question that you don't know?
Try a simpler, related problem if you are getting stuck: it may help point
the way forward.
For example, your original question has three arguments. Can you do the
problem variation that just has one boolean argument? Call this odd1().
You can see that it's like the original problem.
If you can do this, try writing odd2(): a function that can deal with two
arguments. Can you do this?
What other similar functions have you seen so far?
These questions are intended to help us calibrate our mental model of what
you currently understand. Please tell us more do we can give you
appropriate answers.
More information about the Tutor
mailing list