Question: Write a program that asks for an integer n from standard input and then print a box with numbers starting in the top left corner,

Write a program that asks for an integer n from standard input and then print a box with numbers starting in the top left corner, going clockwise, that increment by one each corner. If the number exceeds 9, wrap the number back to 0.(Hint: Modulo could be useful here!)
$ python3 modulo_box.py
Enter a number: 1
1--------2
||
||
||
4--------3
$ python3 modulo_box.py
Enter a number: 8
8--------9
||
||
||
1--------0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!