Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a python program using basic maths and formatting strings feature ( f string ) to calculate and display how many days, weeks and months

Create a python program using basic maths and formatting strings feature (f string) to calculate and display how many days, weeks and months we have left if we live until 90 yeras old.
Your program should read your current age and output the message You have x days, y weeks and z months left
Assume 1 year =365 days, 52 weeks, 12 months.
Run your program for 3 test cases (age is 67,20,45)
Sample output for 1 test case is shown below
What is your current age?
67
You have 8395 days, 1196 weeks and 276 months left
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions