Mar-04-2019, 01:47 AM
You can't put a name on the right side of an assignment (=) until it's been on the left side of an assignment. Until it's on the left side, it doesn't exist. So x and y are going to cause name errors.
More generally, you need to store one of the values so you can access it after you have overwritten it with the other value.
I'm assuming this is homework, because there's an easier way to do this in Python.
More generally, you need to store one of the values so you can access it after you have overwritten it with the other value.
I'm assuming this is homework, because there's an easier way to do this in Python.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures