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

Basket of Fruits #52

Open
margo-yunanova opened this issue Sep 22, 2023 · 0 comments
Open

Basket of Fruits #52

margo-yunanova opened this issue Sep 22, 2023 · 0 comments
Assignees
Milestone

Comments

@margo-yunanova
Copy link
Owner

There are 6 types of fruits in the basket: Apples, Pears, Oranges, Lemons, Bananas and Tomatoes.
Your task: given a total number of fruits as an argument (always positive), return the highest possible number of Bananas, while following ALL the rules below:

There are 17 more Oranges than Apples.
There are 40% less Pears than Oranges.
There are 5/6 more Lemons than Pears.
There are 3x less Apples than Bananas.

There might be some Tomatoes left in the basket after you sort them (we dont want the Tomatoes, people think they are vegetables and it gets confusing).
If there are not enough total fruits to follow the rules, return "false".
All fruits must ALWAYS be counted as whole numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant