xveco 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
xveco-0.0.0/LICENSE ADDED
File without changes
xveco-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: xveco
3
+ Version: 0.0.0
4
+ License-File: LICENSE
5
+ Dynamic: license-file
xveco-0.0.0/README.md ADDED
File without changes
File without changes
xveco-0.0.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ from .core import Currency, Account
@@ -0,0 +1,27 @@
1
+ class Currency:
2
+ def __init__(self, name, symbol, value_to_eur, logo=None):
3
+ self.name = name
4
+ self.symbol = symbol
5
+ self.value_to_eur = value_to_eur
6
+ self.logo = logo
7
+
8
+ class Account:
9
+ def __init__(self, name, currency: Currency):
10
+ self.name = name
11
+ self.currency = currency
12
+ self.balance = 0
13
+
14
+ def deposit(self, amount):
15
+ self.balance += amount
16
+
17
+ def withdraw(self, amount):
18
+ if amount > self.balance:
19
+ raise ValueError("no tienes suficiente saldo")
20
+ self.balance -= amount
21
+
22
+ def show_balance(self):
23
+ logo = self.currency.logo if self.currency.logo else ""
24
+ print(f"{logo} {self.name}: {self.balance} {self.currency.symbol}")
25
+
26
+ def balance_in_eur(self):
27
+ return self.balance * self.currency.value_to_eur
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: xveco
3
+ Version: 0.0.0
4
+ License-File: LICENSE
5
+ Dynamic: license-file
@@ -0,0 +1,9 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ xveco/__init__.py
5
+ xveco/core.py
6
+ xveco.egg-info/PKG-INFO
7
+ xveco.egg-info/SOURCES.txt
8
+ xveco.egg-info/dependency_links.txt
9
+ xveco.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ xveco