Created buildup for the project
This commit is contained in:
parent
77be627248
commit
ed20a714a5
10
main.py
10
main.py
@ -1 +1,9 @@
|
|||||||
print("It's alive!")
|
from src.cards.cards import cards
|
||||||
|
from src.tools.tools import *
|
||||||
|
from src.modules.Card import Card
|
||||||
|
|
||||||
|
card = cards[int(input("Chose a card from 1 to " + str(len(cards)) + ": ")) - 1]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PrintCardInfo(Card(card["number"], card["name"], card["surname"], card["type"]))
|
5
src/bank/data/allCards.py
Normal file
5
src/bank/data/allCards.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
cards = [
|
||||||
|
{"number": "1111222233334444", "name": "John", "surname": "Doe", "type": "Credit", "pin": "1234", "clientID": "1234abcd"},
|
||||||
|
{"number": "2222333344445555", "name": "Jane", "surname": "Doe", "type": "Prepaid", "pin": "2345", "clientID": "2345bcde"},
|
||||||
|
{"number": "3333444455556666", "name": "Eric", "surname": "Gudmundson", "type": "ATM", "pin": "3456", "clientID": "3456cdef"},
|
||||||
|
]
|
BIN
src/cards/__pycache__/cards.cpython-38.pyc
Normal file
BIN
src/cards/__pycache__/cards.cpython-38.pyc
Normal file
Binary file not shown.
6
src/cards/cards.py
Normal file
6
src/cards/cards.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
cards = [
|
||||||
|
{"number": "1111222233334444", "name": "John", "surname": "Doe", "type": "Credit"},
|
||||||
|
{"number": "2222333344445555", "name": "Jane", "surname": "Doe", "type": "Prepaid"},
|
||||||
|
{"number": "3333444455556666", "name": "Eric", "surname": "Gudmundson", "type": "ATM"},
|
||||||
|
{"number": "444666", "name": "Adam", "surname": "Somm", "type": "University ID"},
|
||||||
|
]
|
7
src/modules/Card.py
Normal file
7
src/modules/Card.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
class Card:
|
||||||
|
def __init__(self, ownerName, ownerSurname, number, type):
|
||||||
|
self.ownerName = ownerName
|
||||||
|
self.ownerSurname = ownerSurname
|
||||||
|
self.number = number
|
||||||
|
self.type = type
|
||||||
|
|
BIN
src/modules/__pycache__/Card.cpython-38.pyc
Normal file
BIN
src/modules/__pycache__/Card.cpython-38.pyc
Normal file
Binary file not shown.
BIN
src/tools/__pycache__/tools.cpython-38.pyc
Normal file
BIN
src/tools/__pycache__/tools.cpython-38.pyc
Normal file
Binary file not shown.
5
src/tools/tools.py
Normal file
5
src/tools/tools.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
def PrintCardInfo(card):
|
||||||
|
print("Owner's Name: " + card.ownerName)
|
||||||
|
print("Owner's Surname: " + card.ownerSurname)
|
||||||
|
print("Card's Number: " + card.number)
|
||||||
|
print("Card's Type: " + card.type)
|
Loading…
Reference in New Issue
Block a user