Create a program that accepts a name and a birth date and displays the person's birthday,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a program that accepts a name and a birth date and displays the person's birthday, the current day, the person's age, and the number of days until the person's next birthday. Console Birthday Calculator Enter name: Joel Enter birthday (MM/DD/YY) : 2/4/68 Birthday: Sunday, February 04, 1968 Today: Joel is 48 years old. Joel's birthday is in 73 days. Tuesday, November 22, 2016 Continue? (y/n): y Enter name: Django Enter birthday (MM/DD/YY) : 12/1/07 Birthday: Saturday, December 01, 2007 Today: Django is 8 years old. Django's birthday is in 9 days. Tuesday, November 22, 2016 Continue? (y/n): y Enter name: Mike Enter birthday (MM/DD/YY): 11/22/86 Birthday: Saturday, November 22, 1986 Today: Mike is 30 years old. Mike's birthday is today! Tuesday, November 22, 2016 Continue? (y/n): n Specifications Allow the user to enter a date in the MM/DD/YY format. Adjust the date so that it is correct even if the birth year is later than the current year. When you calculate the person's age, don't take leap year into account. If the person is more than 2 years old, display the person's age in years. Otherwise, display the person's age in days. When you display the message that indicates the number of days to the person's birthday, you can use the following format for a person with a name of John: John's birthday is today! John's birthday is tomorrow! John's birthday was yesterday! John's birthday is in X days. today tomorrow yesterday other days Create a program that accepts a name and a birth date and displays the person's birthday, the current day, the person's age, and the number of days until the person's next birthday. Console Birthday Calculator Enter name: Joel Enter birthday (MM/DD/YY) : 2/4/68 Birthday: Sunday, February 04, 1968 Today: Joel is 48 years old. Joel's birthday is in 73 days. Tuesday, November 22, 2016 Continue? (y/n): y Enter name: Django Enter birthday (MM/DD/YY) : 12/1/07 Birthday: Saturday, December 01, 2007 Today: Django is 8 years old. Django's birthday is in 9 days. Tuesday, November 22, 2016 Continue? (y/n): y Enter name: Mike Enter birthday (MM/DD/YY): 11/22/86 Birthday: Saturday, November 22, 1986 Today: Mike is 30 years old. Mike's birthday is today! Tuesday, November 22, 2016 Continue? (y/n): n Specifications Allow the user to enter a date in the MM/DD/YY format. Adjust the date so that it is correct even if the birth year is later than the current year. When you calculate the person's age, don't take leap year into account. If the person is more than 2 years old, display the person's age in years. Otherwise, display the person's age in days. When you display the message that indicates the number of days to the person's birthday, you can use the following format for a person with a name of John: John's birthday is today! John's birthday is tomorrow! John's birthday was yesterday! John's birthday is in X days. today tomorrow yesterday other days
Expert Answer:
Answer rating: 100% (QA)
from datetime import date l312831303130313130313031 def displaydirthadywishesnam... View the full answer
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date:
Students also viewed these algorithms questions
-
In this exercise, you will create a program that displays the number of daily calories needed to maintain your current weight. The number of calories is based on your gender, activity level, and...
-
In this exercise, you will create a program that displays a table consisting of four rows and three columns. The first column should contain the numbers 10 through 13. The second and third columns...
-
In this exercise, you will create a program that displays the gross pay for one or more employees. If necessary, create a new project named Introductory17 Project, and save it in the Cpp8\Chap09...
-
Consider a long cylindrical solenoid with diameter R, number of current loops N and length L through which a current I runs. Now (a) Use Ampre's law to calculate the magnetic field inside the...
-
In Exercise 41, an error was made in grading your final exam. Instead of getting 93, you scored 85. What is your new weighted mean? In Exercise 41 Homework Quizzes Project Speech Final exam Score 85...
-
What are the reasons why the once - popular PL/I - derivative languages, such as Intel s PL/M, Motorola s MPL and Zilog s PL/Z, practically disappeared by the late 1980s (see Fig. 4.1 )? Figure...
-
At the end of 2010, Zaney, Corp., had total assets of $26 million and total liabilities of $15 million. Included in the assets were property, plant, and equipment with a cost of $14 million and...
-
1. Speculate as to the purpose of the share swap between BP and Rosneft. 2. What is the purpose of the two-year lockup period during which neither partner can sell its stock? How might the lockup...
-
2 Company produces product cheese and butter jointly. During October production data as follows: 3 Cheese Butter 4 Gallons at the splitt off point 100,000 150,000 5 October production of final...
-
One of the biggest purchases we make in our lifetimes is for a home. Questions that we all ask are these: How much should I spend for a particular home? How many bathrooms are there? How long...
-
Justify the following equations: GR RT olni VR RT olni T HR RT2 =[xln xd In = 0 (const T, P)
-
1. What points would you keep in mind when you visit a family member in a foreign country? 2. Do you believe that training in foreign ways of eating, dressing, and meeting people is helpful in...
-
Describe a recent service breakdown you have experienced. If you do not feel comfortable sharing the name of the business or organization, describe it. For example, you may say " a small doctor's...
-
Write Case diagram for this system, Improving the customer experience Application Website Application Website Customer Service Interface Smart Chat Extra Customer Service System Direct Chat Service...
-
Compare and contrast If you have lived in two cities or countries (or have traveled extensively in them), write a comparison/contrast of life in those two places. Imagine that your audience wishes...
-
Question 4 of 15. Which of these shareholder-employees seems to be receiving reasonable compensation for their full-time position running the S corporation on a daily basis? O Ashlynn is the only...
-
The management of real estate company is considering you as an external consulting group to outsource the task to develop a reliable predictive model to predict the selling price of the properties,...
-
Refer to the Conservation Ecology (Dec. 2003) study of the causes of forest fragmentation, presented in Exercise 2.166 (p. 97). Recall that the researchers used advanced high-resolution satellite...
-
A program contains three functions named main, calcGross, and displayGross. Two of the functionsmain and calcGrossdeclare a variable named pay. The pay variable name also appears in the displayGross...
-
Write the C++ code for a function that prompts the user to enter a character and then stores the character in a char variable named response. The function should return the contents of the response...
-
Create a program that displays five random addition problems, one at a time, on the computer screen. Each problem should be displayed as a question, like this: What is the sum of x + y?. The x and y...
-
The duties of a nozzle and a diffuser are (a) Opposite to each other (b) Identical to each other (c) Not comparable at all (d) None of these.
-
Nozzles and diffusers are widely used in (a) Heat exchangers (b) Refrigeration systems (c) Rockets and other space vehicles (d) None of these.
-
1 ton of refrigeration is equivalent to (a) \(3.517 \mathrm{~kW}\) (b) \(4.202 \mathrm{~kW}\) (c) \(250 \mathrm{kcal} / \mathrm{min}\) (d) \(50000 \mathrm{kcal} / \mathrm{min}\).
Study smarter with the SolutionInn App