Skip to content

Commit

Permalink
changed some text
Browse files Browse the repository at this point in the history
  • Loading branch information
ljonkergouw committed Nov 25, 2022
1 parent 32f8310 commit 5219152
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions PythonTrainingGroupB/Portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ def get_portfolio(user_name, portfolios):
return [portfolio for portfolio in portfolios['users'] if portfolio['username'] == user_name][0]
else:
print('Portfolio does not exist')



def display_portfolio(user_name, portfolios):
"""
display_portfolio retrieves shows the balance, the number of stocks, and the stocks a user has
display_portfolio shows the balance, the number of stocks, and the stocks a user has
:param user_name: the user_name of a user
:param user_name: the username of a user
:param portfolios: the portfolios dictionary
"""
personal_portfolio = get_portfolio(user_name, portfolios)
Expand All @@ -53,7 +56,8 @@ def add_money(user_name, portfolios, amount):
change_balance(user_name, portfolios, new_balance)
print(f"{amount} is added to your initial balance of {balance} so your new balance is now {personal_portfolio['portfolio']['balance']}")
else:
print("The amount given is not a positive number!")
print("The amount given is not a positive number!")


def change_balance(user_name, portfolios, new_balance):
"""
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# My Project

Welcome to the Project: Investment Game program developed by Luuk Jonkergouw, Louk de Loijer, and Ronald van Oss
Welcome to the Project: Investment Game program developed by Luuk Jonkergouw, Louk de Loijer, and Ronald van Os

## Installation
To install this project's package run:

0 comments on commit 5219152

Please sign in to comment.