Answer:
Implementing on Python for the question, the following is the code.
Explanation:
def intialMatch(l):
word_dict={}
for word in l.split():
if word_dict.get(word)==None:
word_dict[word]=[]
for key in word_dict.keys():
if key[0]==word[0] and (word is not key) :
values = word_dict.get(key)
if word not in values:
values.append(word)
for key,values in word_dict.items():
for value in values:
if value==key:values.remove(value)
return word_dict
t='do what you can with what you have'
print(intialMatch(t))
Jail time since you can be considered a spy or a perv. Whatever you aim is of course.
Answer:
for(int i =0; i<yearlySalesTotals.length;i++)
Explanation:
The for statement in has the syntax as given above, it has an int variable indicating the starting index, then a boolen condition ensuring that you don't get out of the array bounds, and an increment operator.
See below a complete program in java that will output all elements of the array assuming the array yearlySalesTotals contains only ten elements and all indexes has been assigned values.
public class ANot {
public static void main(String[] args) {
double []yearlySalesTotals = new double[10];
for(int i = 0; i<yearlySalesTotals.length; i++){
System.out.println(yearlySalesTotals[i]);
}
}
}