Question: 3 . To make it easier for searching in the future, lets build a function! ## The structure of the function has been provided below.
To make it easier for searching in the future, lets build a function!
## The structure of the function has been provided below.
## Your job is to complete the function in areas that say "YOUR CODE BELOW HERE"
## Example of Function: logSearcher dir C:UsersStudentDocumentstext "SAMPLE" showLogs $True
## this will also work: logSearcher Documents "SAMPLE" $True
function logSearcher$dir,$text,$showLogs
## Create a variable called $results to store your results
## Set $results equal to your SelectString statement similiar to #
## For your Path paramter use $dir, and Pattern use $text variable
## YOUR CODE BELOW HERE
## A ShowLogs parameter is used in this function.
## This parameter is a boolean value $true or $false
## When this parameter is $true, the output will show the results.
## If $false or blank no findings are displayed in the console.
## Write a simple if branch to check if $showLogs is equal to $True,
## then the statement code to print the $results variable
## YOUR CODE BELOW HERE
## Lastly, return the number of hits by using the helper function howMany to output the count of results.
## Remember "return" will pass the object outside of the function when it completes.
## YOUR CODE BELOW HERE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
