Question: Please the answer should be in the EXACT! format below. Thank you Question 4. (5 points) Write a Python function called loops that takes no
Please the answer should be in the EXACT! format below. Thank you
Question 4. (5 points) Write a Python function called loops that takes no parameters and returns nothing. The function begins by asking the eiser to introduce two positive integers which you assign to two variables n and p respectively. The program (function) must then contain: - a loop displaying and incrementing the value of n as long as it remains lower than that of p. - a 2 nd other loop (independent of the 1st one) decrementing the value of p and displaying its value if it is odd. Loop as long as p is not zero. \# testing Question 4 loops () Please enter an integer n=0 Please enter a second integer p=4 Values of n less than p are : 0 2 3 2nd loop : odd p-values are : 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
