Answer:
def is_list_even(list):
return all((x % 2) == 0 for x in list)
def is_list_odd(list):
return all((x % 2) == 1 for x in list)
numberList = []
n = int(input("Enter number of elements : "))
for i in range(0, n):
numberList.append(int(input()))
if is_list_even(numberList):
print("all even")
elif is_list_odd(numberList):
print("all odd")
else:
print("not even or odd")
EXE files are executable files.
PNG files are picture files like JPEG etc.
Answer:
c. StringBuilder
Explanation:
An alternative to the String class would be the StringBuilder Class. This class uses Strings as objects and allows you to mix and match different strings as well as adding, removing, implementing, and modifying strings themselves as though they were similar to an array. Unlike the string class StringBuilder allows you to modify and work with a combination of strings in the same piece of data as opposed to having various objects and copying pieces which would take up more memory.