Answer:
import random
numbers = []
even = 0
odd = 0
for i in range(100):
numbers.append(random.randint(1, 200))
for i in range(100):
if numbers[i] % 2 == 0:
even += 1
else:
odd += 1
print("Even:", even)
print("Odd:", odd)
Explanation:
Gg ez.
A method is written with the header 'num' yourMethod(string name, num code). The method's type is <u>'num'.</u>
In the context of programming. a header refers to supplemental data placed at the beginning of a block of data being transmitted or stored. In the context of the Java method, the header is where you tell the Java program what value type if any, the method will return (a string value, an int value, a double value, etc). As well as the return type, you require a name for your method, which is also placed in the header. You can pass values over to your methods in between a pair of round brackets.
You can learn more about method in Java at
brainly.com/question/28489761
#SPJ4
D it is because its .a5.g1
Using a linear search to find a value that is stored in the last element of an array of 20,000 elements, 20,000 element(s) must be compared.
Answer:
The answer is "For the stop and wait the value of S and R is equal to 1".
Explanation:
- As we know that, the SR protocol is also known as the automatic repeat request (ARQ), this process allows the sender to sends a series of frames with window size, without waiting for the particular ACK of the recipient including with Go-Back-N ARQ.
- This process is mainly used in the data link layer, which uses the sliding window method for the reliable provisioning of data frames, that's why for the SR protocol the value of S =R and S> 1.