Programming in Python, End Term
Given the following code snippet, what will be the output?
if None:
print("None is True")
elif 0:
print("0 is True")
elif "":
print("Empty string is True")
else:
print("All False")
Given the following code snippet, what will be the output?\ **if** **None**:\ print("None is True")\ **elif** 0:\ print("0 is True")\ **elif** "":\ print("Empty string is True")\ **else**:\ print("All False") Consider the below code snippet.\ **def** updated\_val(d, key, val):\ **if** key **in** d:\ d\[key\] += val\ **else**:\ d\[key\] = val\ **return** d\[key\]\ my\_dict = \{'a': 2, 'b': 3\}\ print(\ updated\_val(my\_dict, 'c', 4)\ \+ updated\_val(my\_dict, 'c', 2)\ \+ updated\_val(my\_dict, 'a', 2)\ )\ What will be the output of the above code Given the following code snippet, what will be the output?\ a = (1, 2)\ b = (3, 4)\ c = ((5, 6),)\ d = a + b + c\ e = d\[2:\]\ f = d\[:2\] + (e\[2\],)\ print(f)