Apr-22-2020, 07:16 AM
Hi all,
I am trying to understand how to code the exercise shown below but I am afraid I am stuck.
I guess I am still a newbie in Python.
Can someone please explain to me this exercise?
I cannot provide any code since I don't even know how to start it.
Write a python program that will return a Boolean value that will allow the program to continue The program then requests a number upon which the program responds whether it is odd or even. Essentially we wish to continue entering until we (i.e. the user) is finished. See sample run below:
Run
Please enter a number: ? 5
The number you entered is odd
Another number: ? y
Please enter a number: ? 90
The number you entered is even
Another number: ? Y
Please enter a number: ? 43
The number you entered is odd
Kind regards,
Azure
I am trying to understand how to code the exercise shown below but I am afraid I am stuck.
I guess I am still a newbie in Python.
Can someone please explain to me this exercise?
I cannot provide any code since I don't even know how to start it.
Write a python program that will return a Boolean value that will allow the program to continue The program then requests a number upon which the program responds whether it is odd or even. Essentially we wish to continue entering until we (i.e. the user) is finished. See sample run below:
Run
Please enter a number: ? 5
The number you entered is odd
Another number: ? y
Please enter a number: ? 90
The number you entered is even
Another number: ? Y
Please enter a number: ? 43
The number you entered is odd
Kind regards,
Azure