Daily Mileage Calculator
Below is a question that was first intended for Delphi students, but I need the answer in Python. I cannot paste a screenshot of the GUI, but it has 3 user inputs, one for morning, noon, and evening. Since they ask for the total distance until noon, I would assume the noon and evening distances aren't counted. The following program was developed to explain the use of OR and AND in a decision structure. You are required to write the code for the Midday Report. The report includes the sum of all distances completed for the day (i.e. until noon.) A comment on whether the distance is odd or even is included. However, if the distance exceeds 20km, then the user is recommended to 'Take a Break.' A zero total shows the comment 'What? Nothing yet!!' Would this answer be in the right direction? m = int(input("Enter distance: ")) if(m>20): print("Take it Easy") else if(m==0): print("What? Nothing!!")