Question: using python: Number of years and months Use input to prompt for this integer value: total number of months Calculate these integer values: number of

using python:

Number of years and months

Use input to prompt for this integer value:

  • total number of months

Calculate these integer values:

  • number of years
  • number of months

Display results as

{total number of months} months is {number of years} year(s) and {number of months} month(s). where values in {} are calculated values

Tests

Input Months

Output

18

18 months is 1 year(s) and 6 month(s)

193

193 months is 16 year(s) and 1 month(s)

Be sure to separate input from calculation from output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!