Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

Write a recursive function called print_num_pattern() to output the following number pattern. Given a positive integer as input (Ex: 12), subtract another positive integer (Ex: 3) continually until 0 or a negative value is reached, and then continually add the second integer until the first integer is again reached. For coding simplicity, output a space after every integer, including the last. Do not end output with a newline. Ex. If the input is: 12 3 the output is: 12 9 6 3 0 3 6 9 12


# TODO: Write recursive print_num_pattern() function

if __name__ == "__main__":
num1 = int(input())
num2 = int(input())
print_num_pattern(num1, num2)


Sagot :

We appreciate your visit. Our platform is always here to offer accurate and reliable answers. Return anytime. We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Thank you for trusting Westonci.ca. Don't forget to revisit us for more accurate and insightful answers.