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

Top comments (1)

Collapse
 
szabgab profile image
Gabor Szabo

Nice start.

Become a Moderator Can you help us make DEV a better place?

Fill out this survey and help us by becoming a tag moderator here at DEV.