[Python] Properly formatted multiplication table

Discussão em 'Python' iniciado por Stack, Fevereiro 25, 2025.

  1. Stack

    Stack Membro Participativo

    How would I make a multiplication table that's organized into a neat table? My current code is:

    n=int(input('Please enter a positive integer between 1 and 15: '))
    for row in range(1,n+1):
    for col in range(1,n+1):
    print(row*col)
    print()


    This correctly multiplies everything but has it in list form. I know I need to nest it and space properly, but I'm not sure where that goes?

    Continue reading...

Compartilhe esta Página