Sep-16-2020, 05:51 PM
You're trying to call
Also, your code doesn't really make a lot of sense:
1. Why is the function called
2. the
3. Generally, your classes shouldn't really be taking input from the console - it's not particularly good design. Why aren't you passing the values to the
4.
I'm sure there are more things to comment on, but this is all I noticed on a quick glance.
main
before it is declared - remember the interpreter parses the file from top to bottom. Why are you trying to call it on line 9 anyway?Also, your code doesn't really make a lot of sense:
1. Why is the function called
main
in the first place; that doesn't seem to be a particularly descriptive name.2. the
pin_check
method will return None
in the else
branch. Is that what you intended? Also, why do you need the local variables pin1
and pin2
? Obviously you have access to the member variables self.pin1
and self.pin2
.3. Generally, your classes shouldn't really be taking input from the console - it's not particularly good design. Why aren't you passing the values to the
__init__
method?4.
options
creates a local variable opt
that just gets thrown away.I'm sure there are more things to comment on, but this is all I noticed on a quick glance.