Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this program, you will ask the user for their birthday and then tell them their sign of the zodiac. You should prompt the

  

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Certainly Heres a Python program that meets the requirements you specified python ... 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

The Science And Engineering Of Materials

Authors: Donald R. Askeland, Wendelin J. Wright

7th Edition

1305076761, 978-1305076761

More Books

Students also viewed these Programming questions

Question

What is a solid solution?

Answered: 1 week ago