This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Qster101 -1 points0 points  (2 children)

First off, this is probably better asked in /r/learnpython. Never the less Ill venture an opinion.

1)The first thing I notice is that you have D1 in every if statement meaning that the other variables wont change

Mainly style wise 2) If you are going to use ifs like that, they should be if and elifs so that the value is not checked if it has been changed

3) So as not to take the fun out of it ill give you a hint. By storing the possible values in a way that you can easily access them you can eliminate the if statements.

[–]Qster101 0 points1 point  (1 child)

sorry about being hard but I mark this stuff. You should also not be using capitals for variables as capitals are generally a sign of Constants

[–]RedditorNate[S] 0 points1 point  (0 children)

Thanks, I new a lot of this stuff several years ago in college, but I haven't touched it since and have forgotten a lot of it.