Challenge 2: Check Parity of a Number
Understand how to write a function in Python that checks whether a number is even or odd by returning 0 or 1. This lesson helps you apply basic data types and conditional logic to solve parity problems, reinforcing foundational programming skills.
We'll cover the following...
We'll cover the following...
Parity is a term to express if a given integer is even or odd.
Problem Statement
Given a checkParity(n) function, write code to determine if a given number n is ...