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...
-
Consider the Cournot market in Worked-Out Problem 19.1. Suppose the demand in that market changes to Qd= 5,500 - 25P. Draw the old and new demand curves. What are the new equilibrium quantities and...
-
A thermometer is taken from a room where the temperature is 20oC to the outdoors, where the temperature is 5oC. After one minute the thermometer reads 12oC. (a) What will the reading on the...
-
Gilead is a large drug producer, with a majority of its prescription drug product sales occurring in the United States. Gilead produces anti-HIV drug therapies, including the drugs Atripla, Truvada,...
-
Carlos Arruza Company exchanged equipment used in its manufacturing operations plus $3,000 in cash for similar equipment used in the operations of Tony LoBianco Company. The following information...
-
India's trade deficit has risen by almost 88% in financial year 2022. While total exports increased, imports too soared to a great extent. Analyze the impact of this trade deficit on the balance of...
-
A cascade system is composed of two ideal refrigeration cycles, as shown in Fig. 9.28. The high temperature cycle uses R-410a. Saturated liquid leaves the condenser at 40C, and saturated vapor leaves...
-
Find the face value of the zero-coupon bond. 19-year bond at 4.3%; price $12,000 The face value will be $ (Do not round until the final answer. Then round to the nearest dollar as needed.)
-
3. The power transmission system from a diesel engine to a propeller for a ship is shown in simplified form below. The role of the fluid coupling is to transmit the main flow of power from the engine...
-
Using numerous computers to inundate and overwhelm the network from numerous launch points is called a(n). attack. A) DDoS B) DoS C) SQL injection D) phishing E) botnet
-
What is the relationship between abstraction and encapsulation in OOP? Abstraction is about making relevant information visible, while encapsulation enables a programmer to implement the desired...
-
What ensures that nothing tampers with blockchain's data? O using a hash O using encryption O deleting certain data O using a firewall O I don't know this yet.
-
What is the primary goal of data normalization in big data systems? Group of answer choices Reducing data redundancy Enhancing data visualization Increasing data storage capacity Improving data...
-
Consider the string (011) ((01) (01)0)R (a) What is the length of the string over the alphabet {0,1}? (b) What is the length of the string over the alphabet {01, 1}? (c) What is the length of the...
-
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...
-
Find the dynamic system response for the rotational mechanical system shown below. There is a constant input angular speed, \(\omega(t)=\beta\), and zero initial angular speed, \(\omega_{1}(0)=0\)...
-
Consider a first-order system with no input such that the input-output differential equation is given by \[\dot{y}+3 y=0 \text {. }\] Find its system response.
-
A dynamic system is described by the following State-Variable Matrix model such that: \(\dot{\mathbf{x}}=\mathbf{A x}\) and \(\mathbf{y}=\mathbf{C x}\), where (a) Obtain the State-Transition Matrix...
Study smarter with the SolutionInn App