Skip to content

ATM solved - #116

Open
mayareu wants to merge 2 commits into
osherdp:masterfrom
mayareu:master
Open

ATM solved#116
mayareu wants to merge 2 commits into
osherdp:masterfrom
mayareu:master

Conversation

@mayareu

@mayareu mayareu commented Mar 31, 2020

Copy link
Copy Markdown

No description provided.

Comment thread Atm.py
def main():
has_data_changed = False
with open(FILE_PATH, 'r') as file:
costumers = [i[:i.find('\n')] for i in file.readlines()]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think readlines removes the \n

Comment thread Atm.py
@@ -0,0 +1,136 @@
from pip._vendor.distlib.compat import raw_input

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please create an atm class with all this functionality

Comment thread Atm.py
with open(FILE_PATH, 'r') as file:
costumers = [i[:i.find('\n')] for i in file.readlines()]
costumers = [i.split(',') for i in costumers]
global COSTUMERS_DICTIONARY

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't use globals, this should be a variable of the atm class

Comment thread Atm.py
costumers = [i.split(',') for i in costumers]
global COSTUMERS_DICTIONARY
for i in costumers:
if i[0] and i[1] and i[2]:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make the magic number consts please

Comment thread Atm.py
'4 Change password\n')

operation_number = int(operation_number.strip())
if operation_number == 1:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use consts here too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants