Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added question about tracking income #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OfErosAngel
Copy link
Collaborator

No description provided.


Welcome to **Tracking Income**! Here is the problem statement:

You are given a list of revenue and expenses incurred by your company. Revenue is money coming in, Expensises is money going out. Your job is to write a code to calculate how much money the company has at the end of the day.
Copy link

Choose a reason for hiding this comment

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

"write a code" -> "write a program"

```
The first element in `Money` indicates the amount of money the company has at the start of the day. The rest of the elements in the list indicate the amount of money being earned or spent throughout the day. The company should spend 12 dollars, earn 5, spend 6, earn 18, spend 25, spend 30, then earn 20 before the end of the day.

Therefor your function should return
Copy link
Contributor

Choose a reason for hiding this comment

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

therefore is spelt wrong


Welcome to **Tracking Income**! Here is the problem statement:

You are given a list of revenue and expenses incurred by your company. Revenue is money coming in, Expensises is money going out. Your job is to write a code to calculate how much money the company has at the end of the day.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
You are given a list of revenue and expenses incurred by your company. Revenue is money coming in, Expensises is money going out. Your job is to write a code to calculate how much money the company has at the end of the day.
You are given a list of revenue and expenses incurred by your company. Revenue is money coming in, Expenses is money going out. Your job is to write a code to calculate how much money the company has at the end of the day.

```python
def Income(Money):
return sum(Money for Money in Money)

Copy link
Collaborator

Choose a reason for hiding this comment

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

solution could be rewritten to be a little more clearer

Comment on lines +12 to +19
Money = [200, -12, 5, -6, 18, -25, -30, 20]
```
The first element in `Money` indicates the amount of money the company has at the start of the day. The rest of the elements in the list indicate the amount of money being earned or spent throughout the day. The company should spend 12 dollars, earn 5, spend 6, earn 18, spend 25, spend 30, then earn 20 before the end of the day.

Therefor your function should return
```python
170
```
Copy link

Choose a reason for hiding this comment

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

i would store the starting amount as a separate variable

Copy link

@AJaccP AJaccP left a comment

Choose a reason for hiding this comment

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

check comments


Welcome to **Tracking Income**! Here is the problem statement:

You are given a list of revenue and expenses incurred by your company. Revenue is money coming in, Expensises is money going out. Your job is to write a code to calculate how much money the company has at the end of the day.
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could make more of a story here. Like give a scenario where its like "You are the accountant of a big company are you are trying to track money in and money out to make sure the company is not overspending. Here is a balance sheet of the day. Figure out if the company is making money,


Welcome to **Tracking Income**! Here is the problem statement:

You are given a list of revenue and expenses incurred by your company. Revenue is money coming in, Expensises is money going out. Your job is to write a code to calculate how much money the company has at the end of the day.
Copy link
Collaborator

@shannonpaul3 shannonpaul3 Oct 21, 2023

Choose a reason for hiding this comment

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

Suggested change
You are given a list of revenue and expenses incurred by your company. Revenue is money coming in, Expensises is money going out. Your job is to write a code to calculate how much money the company has at the end of the day.
You are given a list of revenue and expenses incurred by your company. Revenue is money coming in, Expenses is money going out. Your job is to write code that calculates how much money the company has at the end of the day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

8 participants