DEV Community

invictus476
invictus476

Posted on

Codecademy Intro to IT Project

This is my Project for the Intro to IT course from codecademy.com. No cool background for me, taking a few courses for fun. So... here it is.

Part 1: Plan and write algorithm#

1. Create a variable called “text” (text=””), enter the value of “text” (test=”2022 world cup standings”)

  1. Create a variable called “pattern” (pattern=””), enter the value of “pattern” (pattern=” world cup”)
  2. Create “match_count” variable, set the value to 0
  3. Has the text value been searched? ◦ If no, go to step 5 ◦ If yes, skip to step 7
  4. Iterate to the next word in “text”
  5. Is the value of “text” and “pattern” equal? ◦ If yes, go to step 7 ◦ If no, return to step 5
  6. If “match_count” is equal to the length of pattern, then pattern found. If not, pattern not found.
Enter fullscreen mode Exit fullscreen mode

Part 2: Create a flowchart

Project Flowchart

Part 3: Test the Chart

1. text = "ERROR: Invalid function arguments"; pattern = "ERROR"

  1. text = "ERROR: Out of memory"; pattern = "network"
  2. text = "ERROR: The file is write-protected"; pattern = "protected" Solution: I will conduct an analysis inputs to make sure it works as expected.
Enter fullscreen mode Exit fullscreen mode

Part 4: Produce the Pseudocode#

Define “text” (text=”?”)
Define “pattern” (pattern=”?”)
If entire pattern hasn’t been searched:
Move on to next character of the text
Create “match_count” set to 0
If entire pattern hasn’t been searched:
if this character from the pattern is equal to the character from text:
increment match_count variable by 1
if match_count is equal to the length of the pattern:
pattern found
otherwise:
no pattern found

Conclusion

This is the end of my first Software Development Concepts project from Codecademy. Honestly, I’d like to give a shout out to dev.to user Liudmyla, I appreciate the work that was done in this project. It shed a ton of light for me and was as great help. So, thanks to you Liudmyla for your work! Great Job! If anyone sees this and wants to see a better looking project here’s the link to Liudmyla’s project.

Liudmyla’s project

Latest comments (1)

Collapse
 
szabgab profile image
Gabor Szabo

Nice start.