Question: 8.) (10 points) Write a Python function that takes a positive integer from the user, computes the sum of the integers between one and that

8.) (10 points) Write a Python function that takes a positive integer from the user, computes the sum of the integers between one and that number, and prints the result to the screen. The following code contains a nested for loop. How many times will it print the word "Aye" to the console? \[ \begin{array}{l} \text { def print_nums }(x, y) \text { : } \\ \text { for } h \text { in range( } y) \text { : } \\ \text { print("Aye") } \\ \text { for } \mathrm{i} \text { in range }(\mathrm{x}) \text { : } \\ \text { print("Aye") } \end{array} \] \[ \text { print_nums( }(5,3) \] a.) 15 b.) 8 c.) 5 d.) 18 e.) 20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
