def even_checker(lst):
for x in lst:
if x%2==0:
print(x)
l = [1,2,3,4,5,6,7,8,9,10]
even_checker(l)
I wrote my code in python 3.8. I hope this helps.
Answer:
for(String s:words)
if(s.endsWith("ing"))
System.out.println(s);
Explanation:
Create an enhanced for loop that iterates through the words array
Check if an element in words ends with "ing" using endsWith() method (Since it is said that strings are lowercase letters, we do not need to check it)
If you find one that ends with "ing", print the element
Answer:
A. simple to construct and easy to repair
Explanation:
A dynamic microphone works on the principle of electromagnetic principle. A diaphragm is attached to a coil of wire which helps in producing sound. Responding to the sound waves, the coil of the wire is vibrated by the diaphragm. A magnetic field is created by the magnet which is present inside the coil of wire. The electrical signal is generated in response to the motion of the coil. The speed of the motion produces the amount of the current.
Since the construction of a dynamic microphone is easier as compared to any other microphone, John is likely to opt to build one.
<u>Answer:</u>
- <em>A. divide the decimal number by the base value 2</em>
- <em>C. note the remainder separately</em>
- <em>D. divide by 2 until she gets 0 as the remainder</em>
- <em>B. collect the digits in the reverse order</em>
<u>Explanation:</u>
When we want to convert decimal number to a binary number first we have divide the given number by 2. The next step is to note the reminder of the number in the side every division so that the reminder value is the binary value. Repeat this until an zero is encountered.
We have to collate all the remainders from last of first and then the collated number is the answer for the given problem.
<em>So the given option can be ordered as,
</em>
- <em>A</em>
- <em>C</em>
- <em>D</em>
- <em>B</em>