subject

Write a function called is_even that takes one parameter and returns a boolean value. It should return True if the argument is even; it should return False otherwise. The is_even function should not print anything out or return a number. It should only take in a number and return a boolean.

Note: Be sure to include comments for all functions that you use or create.

For example, if you made a call like

is_even_number = is_even(4)
is_even_number should have the value True.

Once you’ve written this function, write a program that asks the user for integers and prints whether the number they entered is even or odd using your is_even function. You should let the user keep entering numbers until they enter the SENTINEL value.

Here is a sample run of the program:

Enter a number: 5
Odd
Enter a number 42
Even
Enter a number: -6
Even
Enter a number: 0
Done!

(CODEHS, PYTHON)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 08:10
Where are american poets found in the dewey decimal system
Answers: 1
question
Computers and Technology, 25.06.2019 09:50
Part a: data processing given a data file, find the max, min, and average values of columns. also, create an addition column that is based on the other columns. there will be no error checking required for this lab. you are provided with a data file named (surprise! ) data.txt. data is arranged in columns where each item of data is twelve columns wide (so it is easy to extract data items using slicing): name height(m) weight(kg) joe 1.82 72.57 mary 1.60 63.50 dion 1.90 90.71 kayla 1.72 66.31 jose 1.78 70.23 sofia 1.63 65.12 erik 1.98 92.21 sara 1.57 65.77 your task is read the file data.txt and calculate the max, min, and average of the height and weight columns and to add an additional column that has the bmi calculated based on each height and weight. your output will look like this (and needs to be formatted like this). to match the testing on mimir here is the format string: "{: < 12s}{: < 12.2f}{: < 12.2f}{: < 12.2f}"
Answers: 3
question
Computers and Technology, 25.06.2019 10:40
If you're using the paintbrush tool and want to change the color of the paint being used what should you change
Answers: 2
question
Computers and Technology, 25.06.2019 11:30
How do you put a picture with your question? i need to put a picture with my question
Answers: 1
You know the right answer?
Write a function called is_even that takes one parameter and returns a boolean value. It should retu...
Questions
question
Mathematics, 02.02.2021 05:30
question
Mathematics, 02.02.2021 05:30
Questions on the website: 13722361