Cody Bable

Generation

generate functionTue, 25 Apr 2023

create a multiplication table grid

def mult_table(n): for i in range(1, n+1): print('\t',i, end='') print() print('\t' + '-'*(2*n+1)) for i in range(1, n+1): print(i, end='') for j in range(1, n+1): print('\t', i*j, end='') print() mult_table(4)

Questions about programming?Chat with your personal AI assistant