DEV Community

Cover image for Workflow Project
Marilyn Bates
Marilyn Bates

Posted on

Workflow Project

This is my first post. Sorry if it's not great.
This is my Codecademy Workflow project. It is meant to find a pattern in a line of text.
For example: text = 'pizza pizza'
pattern = 'za'
The workflow asks: Does the text 'pizza pizza' contain the pattern 'za'? If so, 'Pattern Found'. If not move to the next word until the pattern is found.

This is a link to my flowchart on Lucid.

This is my pseudocode for this project:

Define text
Define pattern

if the entire text hasn't been searched:
  continue to the next character of the text.
  create a match_point variable and set it to 0.
  if the entire text hasn't been searched:
   if the characters in the text match the characters in the pattern:
   increase the match_count variable by 1.
if the match_count is equal to the pattern:
  'Pattern found!'

Enter fullscreen mode Exit fullscreen mode

Ok. I think this is all I have for now.

Top comments (0)