# findshivanisachan/inueron-assignment-3

a year ago

#### Write a function to compute 5/0 and use try/except to catch the exceptions.

In [3]:
``````def compute():
a = 5/0
try:
print(compute())

except ZeroDivisionError as ze:
print('Error: while dividing with zero it should through error') ``````
```Error: while dividing with zero it should through error ```

#### objects=["Baseball","Cricket"]

In [4]:
``````subjects=["Americans ","Indians "]
verbs=["play ","watch "]
objects=["Baseball","Cricket"]
for s in subjects:
for v in verbs:
for o in objects:
sentence = s+v+o
print(sentence)
``````
```Americans play Baseball Americans play Cricket Americans watch Baseball Americans watch Cricket Indians play Baseball Indians play Cricket Indians watch Baseball Indians watch Cricket ```

#### of N - i - 1.

In [5]:
``````import numpy as np
x = np.array([1, 2, 3, 4, 5, 6])
N = 3
np.vander(x, N)
np.column_stack([x**(N-1-i) for i in range(N)])
np.vander(x)
np.vander(x, increasing=True)``````
Out[5]:
``````array([[   1,    1,    1,    1,    1,    1],
[   1,    2,    4,    8,   16,   32],
[   1,    3,    9,   27,   81,  243],
[   1,    4,   16,   64,  256, 1024],
[   1,    5,   25,  125,  625, 3125],
[   1,    6,   36,  216, 1296, 7776]])``````
In [6]:
``````import jovian

``````
In [ ]:
``jovian.commit()``
```[jovian] Saving notebook.. ```
In [ ]:
`` ``