Question: (Python) Write a program named that prompts the user to enter an integer, then responds by identifying the input as either odd or even as
(Python) Write a program named that prompts the user to enter an integer, then responds by identifying the input as either odd or even as appropriate.
Execution should result in the program as seen below.
>>>Run
Enter a Whole Number: 8
Number entered is even.
Enter a Whole Number: 9
Number entered is odd.
---I have come up with the below, but have been told to incorporate Print - f'strings whenever possible with print statements. I tried to do this and ran into errors. Could someone please review my current code and see how I may be able to incorporate f'strings?
#Start #Prompt User for Input
print("Enter a Whole Number:")
#Assign input variable, int number=int(input("Enter a Whole Number"))
#Compound boolean expression to determine Even/Odd x=int(number/2)*2; if(x==number): print("This Number is Even") else: print("This Number is Odd.")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
