Question No. 6: Pattern Practice Questions

Question No. 6 mentioned in the practice pattern sheets given in the module. Kindly help me with the solution of it

@yadavtushar060_ebfa802d75ab9f1c Refer this code :