-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
39 lines (22 loc) · 772 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from Reader import Reader
import utils
print('##### Story 1 #####')
reader = Reader()
accounts_file = open('./accounts.txt')
reader.parse_text_file(accounts_file)
print(reader.accounts[1].to_string())
print('##### Story 2 #####')
print(reader.accounts[1].check_sum())
print('##### Story 3 #####')
output_file = open('output.txt', 'w')
for account in reader.accounts:
output_file.write(account.to_string() + ' ' + account.account_state() + '\n')
output_file.close()
print('Check the output.txt file')
print('##### Story 4 #####')
print(utils.fix_account_number(reader.accounts[0]))
print('##### Story 5 #####')
print('Support for Hexa characters added!')
print('#### Printing test')
print(reader.accounts[1])
print(reader.accounts[1].account_number[0])