Created
February 24, 2014 22:38
-
-
Save Smerity/9198784 to your computer and use it in GitHub Desktop.
Rage inducing code snippets from lectures and homework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How many of these lines actually do something? | |
if (U < A): | |
x[i] = x_star | |
i = i + 1 | |
x_prev = x_star | |
else: | |
x[i] = x_prev | |
x_prev = x[i] | |
i = i + 1 | |
i=i-1 | |
... later ... | |
if U < A: | |
y[i] = y_star | |
i = i + 1 | |
y_prev = y_star | |
else: | |
y[i] = y_prev | |
y_prev = y[i]; | |
i = i + 1 | |
... or you could, y'know, just write ... | |
if (U < A): | |
x[i] = x_star | |
x_prev = x_star | |
else: | |
x[i] = x_prev | |
i += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment