logo CodeStepByStep logo

print_number_square

Language/Type: Python parameters loops

Write a function named print_number_square that accepts a minimum and maximum integer and prints a square of lines of increasing numbers. The first line should start with the minimum, and each line that follows should start with the next-higher number. The sequence of numbers on a line wraps back to the minimum after it hits the maximum. For example, the call of print_number_square(3, 7) should produce the following output:

34567
45673
56734
67345
73456

If the maximum passed is less than the minimum, the function produces no output.

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.