Answer:
- m = 3
- n = 20
-
- triList = []
- current = 0
- for i in range(1, n + 1):
- current = current + i
- if(current >= m and current <= n):
- triList.append(current)
-
- print(triList)
Explanation:
The solution code is written in Python 3.
Firstly, create variable m and n and set the value 3 and 20 to the variables (Line 1 -2)
Create a triangle number list (Line 4) and another variable current to hold the value of current total of triangle number (Line 5).
Create a for loop and iterate through the number between m and n (Line 6). Calculate the current total of triangle number (Line 7) and proceed to check if the current triangle number is bigger or equal to m and smaller and equal to n, add the current triangle number to triList (Line 8-9).
Print the triList (Line 11) and we shall get [3, 6, 10, 15]
A business plan and a <u>financial plan</u> to show the both his plan to make money, and how much money he will make, spend, use.
Answer:
TCP/IP
Explanation:
TCP/IP which stands for Transmission Control Protocol and Internet Protocol are network protocols which divide your message into smaller chunks or fragments known as network packets and sends them out onto the Internet. When the chunks arrive at the intended destination, TCP/IP on the receiving end reassembles the network packets into the original message.
TCP/IP are the main protocols used for sending data over the internet.
Answer:
Explanation:
The following code is written in Java. It is hard to fully create the code without the rest of the needed code including the T class and the Measurable interface. Regardless the following code can be implemented if you have that code available.
public static T minmax(ArrayList<T> mylist) {
T min = new T();
T max = new T();
for (int x = 0; x < mylist.size(); x++) {
if (mylist.get(x) > max) {
max = mylist.get(x);
} else if (mylist.get(x) < min) {
min = mylist.get(x);
}
}
return (min, max);
}