RE: VERY first python program 11-27-2012, 05:31 PM
#6
(11-27-2012, 05:27 PM)Deque Wrote:(11-27-2012, 05:18 PM)LightX Wrote: The code did work, but so what you are saying is that I should use elif instead of if's the whole time?
No, I didn't say that.
I tried to explain that your current checks (if-statements) are inefficient, because you check unnecessarily.
Get to know how if, else and elif work together in order to achieve a better code.
Try to understand by looking at my explanations and pseudocode why it is better.
Maybe I can make up some examples to explain it better. I often feel that my english is not good enough.
Okay, thank you for the tip! I will look into it!
And honestly, i thought you were from the US...i couldnt tell that you werent good with your english...so good job!




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)