Løsningsforslag


# Gangetabellen
# (C) 2021 BITJUNGLE Rune Mathisen
# This code is licensed under a GPLv3 license 
# See http://www.gnu.org/licenses/gpl-3.0.html 

get_input = True

while get_input:
    print('Jeg regner ut en hvilken som helst gangetabell for deg!')
    start_number = int(input('Tast inn start-tall: '))
    stop_number = int(input('Tast inn slutt-tall: '))
    if start_number > stop_number:
        print('Start-tallet må være mindre enn slutt-tallet!')
    else:
        get_input = False

for y in range(start_number, stop_number + 1):
    for x in range(start_number, stop_number + 1):
        print(x*y, end="\t")
    print("\n")