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.
Answer:
printArray(inventory, n);
Explanation:
The question doesn't specify in which language this has to be done, here's a generic call then... so if it's aimed at a specific language, some minor adjustments might be needed to respect the proper syntax/structure of that specific language.
Given:
printArray: function name, using 2 parameters.
inventory: array of ints
n : integer, number of items in array inventory
The call to the function would be:
printArray(inventory, n);
Answer:
public static String onlyDigits(String in){
String digitsOnly = in.replaceAll("[^0-9]", "");
return digitsOnly;
}
A Complete program is wrtten in the explanation section
Explanation:
public class TestClass {
public static void main(String[] args) {
String a = "-jaskdh2367sd.27askjdfh23";
System.out.println(onlyDigits(a));
}
public static String onlyDigits(String in){
String digitsOnly = in.replaceAll("[^0-9]", "");
return digitsOnly;
}
}
The output: 23672723
The main logic here is using the Java replaceAll method which returns a string after replacing all the sequence of characters that match its argument, regex with an empty string
Answer:
Personal software process is basically refers to the intellectually tough and demanding for a degree of commitment (for example: Prolonged and high priced training needed ) which are not usually feasible to attain.
In additional to the requiring stage of various dimension is culturally tough for various software program practitioners. As, it is not much feasible approach so the personal software processing is not much widely adopted by the various software industries.
A part-time job would provide on-the-job experience while also giving him a flexible schedule competing with school.