def is_list_even(my_list):
for i in my_list:
if(i%2 != 0):
return False
return True
def is_list_odd(my_list):
for i in my_list:
if(i%2 == 0):
return False
return True
def main():
n = int(input())
lst = []
for i in range(n):
lst.append(int(input()))
if(is_list_even(lst)):
print('all even')
elif(is_list_odd(lst)):
print('all odd')
else:
print('not even or odd')
if __name__ == '__main__':
main()
Answer:
Explanation:
There are different advantages to buy commercial software like:
- Is a system used for other companies, we will have good referents with the feedback of them.
- Support, we should have support twenty-four hours, if a system doesn't have good support, we must not buy the software.
- We can choose software with a lower initial cost, this depends on our needs.
Answer:
hot components or sharp edges of computer is an example of a mechanical hazard
The <DEL> or <Delete> key makes the first character AFTER the cursor
disappear, and everything after it then moves back one space to close up
the hole.
Example:
If I have this in my document ... Most trees are green.
And my cursor is after the 'a', like this: Most trees a|re green.
Now, if I hit the <delete> key, it deletes the
'r' after the cursor, and the hole closes up,
and the cursor stays where it is: Most trees a|e green.
Answer:
Following are statement is given below
int k=1,total=0; // variable declaration
while(k<50) // iterating the while loop
{
total=total+k*k;// calculating the square
k=k+1; // increments the value of k by 1
}
Explanation:
Following are the description of Statement.
- Declared a variable "total" and "k" of the "integer " type initialized the total to 0 and "k" to 1.
- Iterating the while loop for less then 50 .In this loop, we calculating the sum of square of first 50 number in the "total" variable .
- After that increment the value of "k" variable by 1 to execute the loop less then 50 .