Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new Python project (Hwk03) with a new Python file (Hwk03_YourLastName). Add program documentation to the Python files you create* (see below). Create a

Create a new Python project (Hwk03) with a new Python file (Hwk03_YourLastName). Add program documentation to the Python files you create* (see below). Create a Python program to prompt the user for their first name, current age (in years), and their expected life span (in years). Calculate their age in days, and the number of days they have remaining. (Assume 365 days per year with no partial years.) Write the results (using your first name) to the console window in this format:

Barack, you are 20075 days old. You have 10950 days left to live.

(You may wish to take a look at an Internet version of this tomfoolery: http://deathclock.com/)

HINTS: Use the int() type conversion function to convert the raw_input() into a number. Use the str() type conversion function to convert the numbers back to strings in order to create the results message above. Use concatenation to put the strings together in the output statement.

Somethings wrong with my answer..

image text in transcribed

>>> # your code goes here # Enter the name Nameinput ( 'Enter your name ') # Enter the age Age - int (input( 'Enter your age ')) Enter the life expectancy Expectancy = int( input ('Enter your life expectancy ')) # Print the result Age_in_days Age 365 Expectancy-in-days = Expectancy#365 print( Name you arestr(Age_in_days)days old. You have str(Expectancy_in_days)days left to live.n File "

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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Understand the role of corporate design in communications.

Answered: 1 week ago