Cody Bable

Generation

generate functionTue, 25 Apr 2023

create a multiplication table grid using lines and dashes

def create_grid(w, h, p): result = "" for i in range(h): if i > 0: result += "\n" result += p * w return result print(create_grid(6, 5, "-"))

Questions about programming?Chat with your personal AI assistant