Psuedocode is the process of writing words to represent what you will write in code. Psudeocode is language agnostic (this same psuedocode could be implemented in Python, Ruby, etc.). It is a tool to help you organize your thoughts before coding, and also coordinate with other developers to make sure you are all aligned on the vision.
Here is a trivial example:
Situation: you have a list of stock prices for the last month, and you want to find the lowest price.
* Set a variable `lowest` equal to the first value of the array of prices * Iterate through all of the values of the array - Compare the current value to the value of `lowest` - If the current value is lower than `lowest`, set `lowest` equal to the current value * return lowest
This translates into python as:
prices = [35.40, 32.10, 35.03, 44.00, 20.00] lowest = prices for price in prices: if price < lowest: lowest = price return lowest
:whitecheckmark: Practice: How would you psuedocode the following problems?