In this program, you will ask the user for their birthday and then tell them their...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In this program, you will ask the user for their birthday and then tell them their sign of the zodiac. You should prompt the user for their birthday in the format mmdd. In other words, a four character integer. It is acceptable if the user doesn't enter the leading zero. In other words, 0101 and 101 are both acceptable for January 1". Note that you need to process both the month and day to determine the correct sign. You might find integer division and the modulo operator helpful for splitting the number. You can assume that the user enters an integer between 0000 and 9999, but if they enter an invalid date, you should tell them so. Please take special note of the following requirements: 1) In your code, there should only be two print statements, one if the date is valid, one if not. This requirement is really important. It is intended to help you think about how to avoid writing duplicate lines of code. Using a function is not an acceptable way of avoiding this requirement. 2) You must modify the output depending if the first character of the sign is a vowel - an Aries vs a Capricorn. 3) You must modify the suffix of the number as in 1st, 2nd or 3rd. 4) Use of lists (structures that use []) and dictionaries (structures that use (3) are not permitted in this assignment. 5) Do not use the exit() function for this program (or any other program during this course) You should use the following tables for your reference: Sign Dates Month #Days Aries March 21-April 20 January 31 Taurus April 21-May 21 February 29 Gemini May 22-June 21 March 31 Cancer June 22-July 22 April 30 Leo Virgo July 23-August 22 May 31 August 23-September 23 June 30 Libra September 24- Libra September 24-October 23 July 31 Scorpio October 24-November 22 August 31 Sagittarius November 23-December 21 Capricorn December 22-January 20 September 30 October 31 Aquarius January 21-February 19 November 30 Pisces February 20-March 201 December 31 Day Suffix 1, 21, 31 st 2, 22 nd 3,23 rd All else th Here are some sample runs: Please enter your birthday using the format mmdd: 0404 Your birthday is April 4th and you are an Aries Please enter your birthday using the format mmdd: 1223 Your birthday is December 23rd and you are a Capricorn Please enter your birthday using the format mmdd: 0234 You have entered an invalid date. Please re-run the program and try again Please enter your birthday using the format mmdd: 1302 You have entered an invalid date. Please re-run the program and try again In this program, you will ask the user for their birthday and then tell them their sign of the zodiac. You should prompt the user for their birthday in the format mmdd. In other words, a four character integer. It is acceptable if the user doesn't enter the leading zero. In other words, 0101 and 101 are both acceptable for January 1". Note that you need to process both the month and day to determine the correct sign. You might find integer division and the modulo operator helpful for splitting the number. You can assume that the user enters an integer between 0000 and 9999, but if they enter an invalid date, you should tell them so. Please take special note of the following requirements: 1) In your code, there should only be two print statements, one if the date is valid, one if not. This requirement is really important. It is intended to help you think about how to avoid writing duplicate lines of code. Using a function is not an acceptable way of avoiding this requirement. 2) You must modify the output depending if the first character of the sign is a vowel - an Aries vs a Capricorn. 3) You must modify the suffix of the number as in 1st, 2nd or 3rd. 4) Use of lists (structures that use []) and dictionaries (structures that use (3) are not permitted in this assignment. 5) Do not use the exit() function for this program (or any other program during this course) You should use the following tables for your reference: Sign Dates Month #Days Aries March 21-April 20 January 31 Taurus April 21-May 21 February 29 Gemini May 22-June 21 March 31 Cancer June 22-July 22 April 30 Leo Virgo July 23-August 22 May 31 August 23-September 23 June 30 Libra September 24- Libra September 24-October 23 July 31 Scorpio October 24-November 22 August 31 Sagittarius November 23-December 21 Capricorn December 22-January 20 September 30 October 31 Aquarius January 21-February 19 November 30 Pisces February 20-March 201 December 31 Day Suffix 1, 21, 31 st 2, 22 nd 3,23 rd All else th Here are some sample runs: Please enter your birthday using the format mmdd: 0404 Your birthday is April 4th and you are an Aries Please enter your birthday using the format mmdd: 1223 Your birthday is December 23rd and you are a Capricorn Please enter your birthday using the format mmdd: 0234 You have entered an invalid date. Please re-run the program and try again Please enter your birthday using the format mmdd: 1302 You have entered an invalid date. Please re-run the program and try again
Expert Answer:
Related Book For
The Science And Engineering Of Materials
ISBN: 9781305076761
7th Edition
Authors: Donald R. Askeland, Wendelin J. Wright
Posted Date:
Students also viewed these programming questions
-
answer the question clearly You are building a flight-control system for which a convincing safety case must be made. Would you assign the tasks of safety requirements engineering, test case...
-
What is the difference between MouseListener and MouseAdapter? [3 marks] (b) Via suitable HTML, the compiled version of the following Java code is presented to the appletviewer application: import...
-
By applying modern technology to agriculture, the United States has become the most productive food-producing nation in the world. The secret to solving the world food security problem lies in...
-
Explain the advantage and disadvantages of establishing one set of accounting standards (IFRS to be followed by all companies around the world
-
Record the following transactions for Summer Consulting. Explanations are not required. Apr. 15 Provided consulting services to Bob Jones and billed the customer $1,500. 18 Provided consulting...
-
Bernardino Santos-Rodiguez was piloting a boat owned by his friend, Raul Viera-Torres, in waters near Guayama, Puerto Rico. The boat was equipped with a hydraulic steering system manufactured by...
-
Puget Sound Divers is a company that provides diving services such as underwater ship repairs to clients in the Puget Sound area. The companys planning budget for May appears below: Required: During...
-
A panel of doctors announces that lookiThe price of steel used to make Stanley tumblers rises sharply. How will this affect the market for water bottles?ng at a screen for too long can affect your...
-
(05.02 MC) Nikhil and Mae work at the same company. Nikhil has been at the company 5 times as long as Mae. Nikhil's time at the company is 8 more than 3 times Mae's time. The following system of...
-
Company A, which owns 40% of Company Y, has the power given by contractual agreement with other shareholders of Company Y to appoint or remove the majority of the members of the board of directors of...
-
Provide two examples where IFRS 10 requires an investor to consolidate its entity while IAS 27 does not require consolidation.
-
Explain the nature of returns in determining control under IFRS 10.
-
How are risks and rewards considered in determining control under IFRS 10?
-
What are the key changes from IAS 27 to IFRS 10 in determining if consolidation of investee is required? What are the reasons that the Board makes these changes?
-
Robert Small is a dentist. Tired of looking in peoples mouths, he attends a Wade Cook seminar on Two Bad Years and Up We Go. He becomes fascinated with Cooks stock market strategies. Small begins to...
-
It is possible to investigate the thermo chemical properties of hydrocarbons with molecular modeling methods. (a) Use electronic structure software to predict cHo values for the alkanes methane...
-
Determine the planar density and packing fraction for FCC nickel in the (100), (110), and (111) planes. Which, if any, of these planes are close packed?
-
At what point does necking typically initiate during a tensile test?
-
What is a solid solution?
-
On June 3, 2019, Catherine Shanahan received an unsolicited phone call on her cell phone. When she answered, she heard a prerecorded voice message advertising extended automobile warranties (Service...
-
John Whalen was employed by the City of Binghamton as the director of Parks and Recreation. In his capacity as the director, Whalen was to collect various fees and was entrusted with related funds....
-
On August 14, 2018, Jane Doe asked her boyfriend to call an Uber for her as Does phone had low battery. Does boyfriend was not with her, so she did not know which driver Uber had assigned to pick her...
Study smarter with the SolutionInn App