Jun-19-2020, 10:09 PM
(Jun-19-2020, 03:09 PM)ndc85430 Wrote: A few things:
1. Your indentation on lines 3-10 is incorrect.
2. When will the condition on line 3 ever beTrue
?
3. Lines 4, 5 and 6: you compute some values and throw the results away. Why? Also, those expressions don't really make any sense: at the very least, you're using=
, which is for assignment and aren't using any variables so assignment doesn't make sense. Did you mean to compare equality? Even in that case, I'm not really sure what the expressions as a whole are meant to do, given there's also a<=
in them.
4. You pass a parameter to the function, but never use it anywhere in the function.
5. Yourelif
s don't have conditions. Remember thatelif
means "else if", so needs to have a condition to make sense.
6. Are you using pytest as your test framework? In any case, you shouldn't need the
hey, very new to python, i sort put it together and trying to guess my through it, i kept getting syntax errors on every line, with line 28: its what the uni have programmed so i wont touch that XD.
most of it is a guess, the course dont really explain things all that well. i will need to keep guessing it, if this post is to much or not aloud please remove XD but if not any tips or hints would be amazing.
Sam