try: from common.inputChecking.typeCheck import inputTypeCheck except ModuleNotFoundError: print('Sjekk README.md for hvilke flagg python trenger') exit(1) def numberPyramid(length): for i in range(length): print('X', ' ' * i + 'X') def numberPyramidDoubleLoop(length): for i in range(length): space = ''.join([' ' for _ in range(i)]) print('X', space + 'X') if __name__ == "__main__": n = inputTypeCheck('n: ', int) numberPyramidDoubleLoop(n)