Home

What is Fruit?

daniel.farrugia - June 28, 2021

A task to help define fruit based recipes, however first we must ask... What is Fruit?

Prerequisites:
1. Microsoft Excel installed. (Note: This can be completed without Excel by utilizing notepad and a CSV file instead)
2. Sign-up for an API key at: https://ndb.nal.usda.gov/ndb/doc/index# (Click ‘Sign up now’ text)

Excel:
Create an excel file with 3 columns; Fruit, Recipe, Ingredients
In the fruit column, add 3 rows; Apple, Orange, Banana (Leave Recipe and Ingredients Blank)

The Problem:
Prompt the user to input the name of a fruit
Check to see if the inputted fruit name exists in column A of our Excel file
Fruit does not exist in excel file:
(Advanced) Search for the user’s input using this API, requesting a JSON formatted response, test to see if the word “fruit” exists within the response
(Intermediate) Confirm the user’s input by repeating the fruit back to them, "Are you sure you want me to check for fig Recipes?"
“Fruit” does not exist in response:
Display a message that says, “I don’t believe this is a fruit” and ask the user if
they’d like to try again or exit.
Try again: Return to the start and prompt the user for the name of a fruit
Exit: End process
“Fruit” does exist in response:
Add the fruit to the next available row in the excel file
Continue from “Fruit does exist”

Fruit does exist in Excel File
Navigate to Taste.com.au and search the fruit name
Look at the top 3 (Non-Featured) recipes and identify which has the most ingredients
Store the Recipe name in Column B next to the relevant fruit
Store the Ingredients in column C, separated by a new line with no excess white space
Prompt the user to ‘Start Again’ or ‘Exit’

Use your project to populate Apple, Orange, Banana, and one fruit of your choosing.
Submit your project folder and completed excel file in a .zip to the email Daniel.Farrugia@withyouwithme.com

Advanced

Intermediate

If you want to break into the tech industry then sign up to our platform and begin your training today.

Join our community

We have a Discord server where you’ll be able to chat with your instructors and cohort. Stay active in your learning!
Join discord