Question: Based on the function definition: what would the following two lines of code print? (Note that I have made the function, parameter and variable
Based on the function definition: what would the following two lines of code print? (Note that I have made the function, parameter and variable names generic to make the question. challenging. When writing code you intend to actually use, always give such things meaningful names!) print (my_function (10, 5)) print (my_function (5, 10)) def my function (numl, num2): if num2 < numl; return -1 else: result - 0 for num in range (numl, num2 + 1): result result + num return result
Step by Step Solution
There are 3 Steps involved in it
The first line print myfunction10 5 will print 1 b... View full answer
Get step-by-step solutions from verified subject matter experts
