Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed program functions.py #1160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anami1504
Copy link

Completed the program# Write a function is_even that will return true if the passed-in number is even.

YOUR CODE HERE

def is_even(n):
if n%2==0:
return True
else:
return False

Read a number from the keyboard

num = input("Enter a number: ")
num = int(num)

Print out "Even!" if the number is even. Otherwise print "Odd"

YOUR CODE HERE

flag = is_even(num)
if flag:
print("Even!")
else:
print("Odd!")

Completed the program
@anami1504
Copy link
Author

The program has been completed and verified successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant