Answer:
The code to this question can be given as:
code:
for(i=1;i<=n;i++) //for loop column
{
for(j=1;j<=i;j++) //for loop for rows
{
printf("*"); // print asterisks
}
printf("\n"); //line break
}
Explanation:
We know that variable i,j, and n is already declared and n variable has initialized a value. So, we write the code that is given above. In this code, we use a nested loop. In this code, we use two loops that are a loop (i)for column and j loop for rows. for print asterisks triangle we use two for loop. For that, we use two-variable (i,j) that is already declared. We assign the value in (i) loop that is 0 and checks that (i) is less than equal to n and increment of (i) by 1. In this loop, we use another loop that is (j) loop. It also starts from 1 and checks that (j) is less than equal to (i)and increment of (j) by 1. In that loop, we print asterisks end of (j) loop. In (i) loop we use ("\n") for line break end of (i) loop.
Answer:
Melon
Explanation:
The variable "list" containts a function that returns a price that is greater than or equal to 60.0.
In the variable "fruit", the only item in the array with a price attribute set above that number is the string Melon.
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))
I don't see any error on your code, everything is well written and simple. Except trying putting PUBLIC on your Class displayer. If you encounter the same problem again try to rebuild your whole code and try to recompile the whole code. Even try restarting your personal computer.