Define a main() function, a doTestOne() function, a doTestTwo() function and
a doTestThree() function.
The main() function should call doTestOne(), doTestTwo() and doTestThree()
1) Prompt the user for a number (e.g., "Please enter an integer.")
2) Using input() retrieve the number entered and store it in a variable called "userInput"
3) Convert the number from text to an integer
4) Determine whether or not the number is an even number by using the modulo operator.
Hint: The expression x % 2 == 0 (modulo operator) evaluates to True when the
remainder of x divided by 2 is 0.
5) If the number is even, print "Number entered is even" If the number is odd, print
"Number entered is odd"
6) Create two variables called 'hungry' and 'thirsty'
7) Set 'hungry' and 'thirsty' to either True or False (it doesn't matter which).
8) Write code that tests 'hungry' and 'thirsty' for all possible combinations
of True and False. There are four possibilities. For example, hungry and
thirsty can both be True, or both be False or one True and the other False.
9) Print the appropriate statement saying whether the user is hungry and/or thirsty
based on conditions using 'if' and 'elif'
10) Prompt the user for a number. (For example, "Please enter an integer.")
11) Using input() retrieve the number entered by the user and store it in a variable called: "userInput"
12) Convert the number to an integer.
13) Using if and else statements, determine if the number entered is:
Divisible by 2 and 3.
Divisible by 2 and not 3.
Divisible by 3 and not 2.
14) Print the appropriate outcome as shown above.
Don't forget to execute the main function as your last line in the program.
Add appropriate comments to the program and describe what each function does above the
functions in comments.
25 freelancers are bidding on average $28 for this job
I am a software engr and experinced programmer I have seen the details of your task and I will make this main() function for you as you described pl contact for details
Good day, I am an I.T guy and i'm working in python and java for last 5 years. Thanks Relevant Skills and Experience Working in python and java for almost 5 years in an M.N.C
I use python daily for automated software tests. I can give you an elegant solution with an hour or so. Relevant Skills and Experience Daily use of python, software architecture and design experience
Dear Sir, I bid low on this project as I am new to freelancer, and am trying to build reputation. This problem is easy to do. Message me if you are interested. Cheers, Nicholas Hamilton, PhD.