Hi, @mansi.
The notebooks use TensorFlow 2. You may find this helpful.
Regarding the exercise, take a look at the hint. You only need two lines of code:
z = ... a = ...
Good luck with the assignment