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...
-
The text identified three goals of macroeconomic policy: Minimize unemployment, Minimize inflation Maximize economic growth Obviously, these goals have elements that conflict with one another. Which...
-
You are a junior sales associate working for Chicago BMW Motorcycle. Because of the economic crisis, sales of motorcycles have taken a huge hit across the board. When money is tight, people tend to...
-
What factors are relevant in setting beta risk?
-
Fernando Garzas firm wishes to use factor rating to help select an outsourcing provider of logistics services. a) With weights from 15 (5 highest) and ratings 1100 (100 highest), use the following...
-
Could you please respond to these questions about restorative justice based on your understanding of it? Interview Questions: Can you define restorative? How does restorative justice differ from...
-
A special case of a normal family is one in which the mean and the variance are related, the n(, ) family. If we are interested in testing this relationship, regardless of the value of , we are again...
-
We have discussed the many aspects of accounting measurement and the many behavioural reactions and interactions to such measurement. It is becoming increasingly clear that accounting is much more...
-
Explain how high-pressure distillation systems influence the volatility of compounds and discuss the engineering challenges associated with operating at elevated pressures .
-
What role does tray efficiency play in the overall performance of a distillation column, and what factors contribute to deviations from theoretical stage efficiency ?
-
How does extractive distillation differ from conventional distillation in terms of solvent selection, mechanism, and industrial applications? Provide examples where extractive distillation is...
-
Discuss the impact of non-ideal mixtures on distillation column design, focusing on vapor-liquid equilibrium (VLE) modeling and the use of activity coefficient-based models like UNIQUAC and NRTL
-
Why are there such discrepancies in the view of performance by the manager and the employees? Is this a good place for 360 feedback? How much should the manager be influenced by employee opinions?...
-
Financial statement analysis, or simply financial analysis, refers to an examination of the viability, stability and profitability of a business enterprise as a whole, or a particular project that it...
-
What is the back work ratio? What are typical back work ratio values for gas-turbine engines?
-
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?
-
Fill in the Blank. __________ equation involves time-dependent coefficients.
-
Fill in the Blank. When finite amplitudes of motion are involved, __________ analysis becomes necessary.
-
Fill in the Blank. __________ principle is not applicable in nonlinear analysis.
Inorganic Coal And Limestone In An Electro Chemical World 1st Edition - ISBN: 1021966282 - Free Book
Study smarter with the SolutionInn App