I did 3 Python questions for 3 days. I wonder how to solve it.

Asked 2 years ago, Updated 2 years ago, 16 views

python

2022-09-20 18:08

2 Answers

most about this short

.
n = int(input())
li = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
for i in range(0, n*n):
    if i % n == 3:
        print(li[i % 10])
    else:
        print(li[i % 10], end='')


2022-09-20 18:08

.


2022-09-20 18:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.