Question: Python coding help with step 3-5 please. Find the evenNum function. Given a number passed in as a parameter, you should use the modulo operator
Python coding help with step 3-5 please.


Find the evenNum function. Given a number passed in as a parameter, you should use the modulo operator to see if that number is even. If the number is even, return True. If it is not even, return False. Note: Return True and False as Booleans and not as Strings. Hint: if a number is even, the remainder should equal 0 . You need to figure out which number to divide by to get 0 . Note: the hashtag (\#) represents any number in this example. i.e. 4 if num 1%#=0 : return True else: return False Find if Number is Odd (Step 4) Find the oddNum function. You should use the modulo operator to see if the number passed in is odd. Return True if the number is odd and return False if it is not. Hint: This should be very similar to the evenNum function. If a number is odd, it will not divide evenly, therefore the remainder will not equal 0. Check if Number is Even or Odd (Step 5) Using the previous functions, check to see if a number is even or odd. If the number is even, return "even". If the number is odd, return "odd". \begin{tabular}{l|l} 23 & \# step 3 \\ 24 & def evenNum(num1): \\ 25 & return None \# TODO \\ 26 & \\ 27 & \# step 4 \\ 28 & def oddNum(num1): \\ 29 & return None \# TODO \\ 30 & \\ 31 & \# step 5 \\ 32 & def checkNum(num1): \\ 33 & return None \# TODO \\ 34 & \\ 35 & def run(): \\ 36 & num1 = int(input())) \\ 37 & print("Factorial:",factorial(num1)) \\ 38 & print ("Modulo:", moduloPractice(num1)) \\ 39 & print("Even:", evenNum(num1)) \\ 10 & nnint "ndd." ndNMumum11) \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
