1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mr Goodwill [35]
3 years ago
14

Write a date transformer program using an if/elif/else statement to transform a numeric date in month/day format to an expanded

US English form and an international Spanish form; for example, 2/14 would be converted to February 14 and 14 febrero
Computers and Technology
1 answer:
boyakko [2]3 years ago
7 0

I wrote it in Python because it was quick so i hope this is helpful

Answer:

date = input('Enter Date: ')

split_date = date.split('/')

month = split_date[0]

day = split_date[1]

if month == '1':

   english_month = 'January'

   spanish_month = 'Enero'

elif month == '2':

   english_month = 'February'

   spanish_month = 'Febrero'

elif month == '3':

   english_month = 'March'

   spanish_month = 'Marzo'

elif month == '4':

   english_month = 'April'

   spanish_month = 'Abril'

elif month == '5':

   english_month = 'May'

   spanish_month = 'Mayo'

elif month == '6':

   english_month = 'June'

   spanish_month = 'Junio'

elif month == '7':

   english_month = 'July'

   spanish_month = 'Julio'

elif month == '8':

   english_month = 'August'

   spanish_month = 'Agosto'

elif month == '9':

   english_month = 'September'

   spanish_month = 'Septiembre'

elif month == '10':

   english_month = 'October'

   spanish_month = 'Octubre'

elif month == '11':

   english_month = 'November'

   spanish_month = 'Noviembre'

elif month == '12':

   english_month = 'December'

   spanish_month = 'Diciembre'

US_English = f'{english_month} {day}'

International_Spanish = f'{day} {spanish_month}'

print(f'US English Form: {US_English}')

print(f'International Spanish Form: {International_Spanish}')

Input:

3/5

Output:

US English Form: March 5

International Spanish Form: 5 Marzo

Explanation:

You start by taking input from the user then splitting that at the '/' so that we have the date and the month in separate variables. Then we have an if statement checking to see what month is given and when the month is detected it sets a Spanish variable and an English variable then prints it to the screen.

Hope this helps.

You might be interested in
Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assista
sladkih [1.3K]
Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assistant.
TEMPLATES
5 0
3 years ago
Read 2 more answers
Which of the following factors will have the greatest impact on your credit score? I. Length of Credit History II. Payment Histo
dedylja [7]

Answer

Your payment history and your amount of debt has the largest impact on your credit score.

Explanation

A credit score is a numerical expression based on a level analysis of a person's credit files, to represent the creditworthiness of an individual. Lenders or those who makes funds available with the expectation that the funds will be repaid, plus any interest uses  credit scores to determine who qualifies for a loan, at what interest rate, and what credit limits.Your payment history is  one piece of information used in calculating your FICO Scores.

8 0
3 years ago
Read 2 more answers
Murray is a database technician. He has created a single enterprise database system. How is this better than multiple databases
EastWind [94]

Answer:

C

Explanation:

data consistency

5 0
4 years ago
You are configuring the local windows firewall on your windows 7 computer. which network category needs to have the most stringe
marusya05 [52]
B because you need to have private
8 0
3 years ago
Which family does Ms word 2007 belongs to?​
kari74 [83]

Explanation:

Ms word 2007 belongs tt the family of Microsoft office.

8 0
3 years ago
Read 2 more answers
Other questions:
  • What feature did the 32X add to the Sega Genesis?
    13·1 answer
  • Select the correct answer.
    8·1 answer
  • Which qualifications are typical for someone working in Marketing Information Management and Research?
    6·1 answer
  • SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA.
    13·1 answer
  • 100 Base-T: Group of answer choices
    11·1 answer
  • Jenny's needs to buy a computer to create word documents, make presentations, listen to music, and watch movies and videos. Whic
    13·1 answer
  • What does this mean?​ pls help me
    12·1 answer
  • Add the following numbers in abacus 2436+9214​
    8·1 answer
  • A__ is a part of a GUI that allows a specific type of interaction with the user.
    14·1 answer
  • Which of these agents of education empowers the other..........
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!