Worldline Interview Question

write a code to design a given pattern what are the changes if we twerk it a bit?