<jupyter_start><jupyter_text>Task 1:  1.Write a function to compute 5/0 and use try/except to catch the exceptions.<jupyter_code>def trycatchfunc(res):
    try:
        res = 5/0
    except:
        print("\nZero divide error\n")
    finally:
        print("\nIn mathematics, no number can be divided by zero\n")
    return res        
res = 0
trycatchfunc(res)<jupyter_output>Zero divide error


In mathematics, no number can be divided by zero<jupyter_text>2.Implement a Python program to generate all sentences where subject is in ["Americans","Indians"] and verb is in ["Play", "watch"] and the object is in ["Baseball","cricket"].Hint: Subject,Verb and Object should be declared in the program as shown below.subjects=["Americans ","Indians"]verbs=["play","watch"]objects=["Baseball","Cricket"]Output should come as below:Americans play Baseball.Americans play Cricket.Americans watch Baseball.Americans watch Cricket.Indians play Baseball.Indians play Cricket.Indians watch Baseball.Indians watch Cricket.<jupyter_code>subjects=["Americans ","Indians "] 
verbs=["play ","watch "] 
objects=["Baseball","Cricket"]
for i in subjects:
    for j in verbs:
        for k in objects:
            print(i,j,k)<jupyter_output>Americans  play Baseball
Americans  play Cricket
Americans  watch Baseball
Americans  watch Cricket
Indians play Baseball
Indians play Cricket
Indians watch Baseball
Indians watch Cricket<jupyter_text>Task 2:   1.Write a function so that the columns of the output matrix are powers of the input vector.The order of the powers is determined by the increasing boolean argument. Specifically, whenincreasing is False, the i-th output column is the input vector raised element-wise to the powerof N - i - 1.  [ vandermonde matrix ]<jupyter_code>import numpy as np<jupyter_output><empty_output><jupyter_text>[column_stack] Stack 1-D arrays as columns into a 2-D array.<jupyter_code>n = int(input("Enter n: "))

li = []

for i in range(n):
    temp = int(input())
    li.append(temp)
    
arr = np.array(li)
arr
type(resarr)
np.column_stack([arr**(n-i-1) for i in range(n)])<jupyter_output><empty_output>