Write up a small python function that accepts two parameters
Write up a small python function that accepts two parameters assumed to be even integers. Print every other value between the two passed parameters on the same line.
Solution
main.py
def printinfo(a,b):
if (a%2==0 and b%2==0):
while (a<b-1):
a=a+1
print a
else:
print \"Numbers are not even.\"
# Now you can call printinfo function
#printinfo(10,20)
a = input(\"Enter first parameters need to be even integers : \");
b = input(\"Enter second parameters need to be even integers : \");
printinfo(a,b)
Output :
