Question: Consider this code that determines whether a number is even or odd. EvenOdd_Functions.py and EvenOdd_NoFunctions.py. Please write a brief paragraph (4-6 sentences) about the following:
Consider this code that determines whether a number is even or odd. EvenOdd_Functions.py and EvenOdd_NoFunctions.py.
Please write a brief paragraph (4-6 sentences) about the following:
- The differences between the two codes
- The pros of the codes
- The cons of the codes
- Why functions are useful


num1 = 3 num2 = 10 num3 = 6 def evenodd(num): if (num % 2) == 0: return "Even" else: return "Odd" print(evenodd(num1)) print(evenodd(num2)) print(evenodd(num3)) num1 = 3 num2 = 10 num3 = 6 if (num1 % 2) == 0: print("Even") else: print("Odd") if (num2 % 2) == 0: print("Even") else: print("Odd") if (num3 % 2) == 0: print("Even") else: print("Odd")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
