generate functionSat, 03 Dec 2022

Hari is a civil engineer who is designing fountain A with water sprinklers in the edges with n number of sepse needs to draw a sketch of the fountain in top view with the the number at the edges of the square Write a program to help him in printing the pattern with number of steps

def print_pattern(n): for i in range(n): print(('.0.' * n)[i:i+3*n]) print_pattern(5)

Questions about programming?Chat with your personal AI assistant