The highest number can only have two digits so you just need to right align 2, using a step of 6 with the first loop and starting the inner loop from each x from the first, we also need to catch when n is equal to -5, 38
with a step of six always gives us 7 columns and six rows unless n is -5 then we need to use 37 so minus (n < -4)
would make 38 -> 37 when n was -5 or else take nothing away:
n = int(input("Enter the start number: "))
if -6 < n < 2:
for x in range(n, 38 - (n < -4), 6):
for j in range(x, x + 6):
print("{:>2}".format(j), end=" ")
print()
Putting it in a function pr_right and running from -5 to 1:
-5 -4 -3 -2 -1 0
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 35 36
-4 -3 -2 -1 0 1
2 3 4 5 6 7
8 9 10 11 12 13
14 15 16 17 18 19
20 21 22 23 24 25
26 27 28 29 30 31
32 33 34 35 36 37
-3 -2 -1 0 1 2
3 4 5 6 7 8
9 10 11 12 13 14
15 16 17 18 19 20
21 22 23 24 25 26
27 28 29 30 31 32
33 34 35 36 37 38
-2 -1 0 1 2 3
4 5 6 7 8 9
10 11 12 13 14 15
16 17 18 19 20 21
22 23 24 25 26 27
28 29 30 31 32 33
34 35 36 37 38 39
-1 0 1 2 3 4
5 6 7 8 9 10
11 12 13 14 15 16
17 18 19 20 21 22
23 24 25 26 27 28
29 30 31 32 33 34
35 36 37 38 39 40
0 1 2 3 4 5
6 7 8 9 10 11
12 13 14 15 16 17
18 19 20 21 22 23
24 25 26 27 28 29
30 31 32 33 34 35
36 37 38 39 40 41
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 35 36
37 38 39 40 41 42
There are other and easier ways but I imagine this is some kind of learning exercise.
If it is actually six rows and 7 columns that is easier:
for x in range(n, 37, 7):
for j in range(x, x + 7):
print("{:>2}".format(j), end=" ")
print()
Which if we run it through another pr_right function outputs:
In [10]: for n in range(-5, 2):
pr_right(n)
print()
....:
-5 -4 -3 -2 -1 0 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 32 33 34 35 36
-4 -3 -2 -1 0 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 32 33 34 35 36 37
-3 -2 -1 0 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
32 33 34 35 36 37 38
-2 -1 0 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 32
33 34 35 36 37 38 39
-1 0 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 32 33
34 35 36 37 38 39 40
0 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 32 33 34
35 36 37 38 39 40 41
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 32 33 34 35
36 37 38 39 40 41 42