NVIDIA interview question

Python question and verilog question to implement the same thing