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
Tuklasin<br>awain 2: Grapiko ng Pananagutan<br>Isulat sa graphic organizer pa​
mrs_skeptik [129]
What are you saying????
7 0
3 years ago
A date for creation or revision<br> is mandatory for all web pages?
rewona [7]

Answer:

I do believe so

Explanation:

Most websites have this, as far as I know

5 0
2 years ago
The first computer was developed by the government to spy on communist activities. Please select the best answer from the choice
allsm [11]
The answer is False.

The first computer was not developed to spy on communist by the government. The first computer was announced in 1946, the ENIAC (Electronic Numerical Integrator and Computer). It was built for general purposes like solving large mathematical problems. The US Army designed the computer to  calculate the artillery firing tables.
3 0
3 years ago
What is cell address?​
Nat2105 [25]

Answer:

A cell reference, or cell address, is an alphanumeric value used to identify a specific cell in a spreadsheet. Each cell address contains “one or more letters” followed by a number. The letter or letters identify the column and the number represents the row.

Explanation:

3 0
3 years ago
You are a database administrator. Chantelle comes to you asking for help on how to access all the data in one row of the databas
Novosadov [1.4K]
I believe the answers would be A and B. Because you have to fulfill  Chantelle's wishes and you have to access their data. Which I am guessing would require a database backup.  

I hope this helps. 
7 0
3 years ago
Other questions:
  • A password checking system that disallows user passwords that are proper names or words that are normally included in a dictiona
    15·1 answer
  • What is micro blogging?
    13·1 answer
  • 6.
    15·1 answer
  • Which one of these is not an example of common presenter mistakes?
    9·1 answer
  • QUESTION
    14·1 answer
  • Declare and implement a function called gameOver.gameOver receives a single 3x3 char[] [] array as a parameter, representing a t
    13·1 answer
  • our grandmother tells you a dollar doesn’t go as far as it used to. She says the “purchasing power” of a dollar is much less tha
    6·1 answer
  • What is the name for the last word on a dictionary page?
    13·1 answer
  • What is it called when a programmer includes a step in an algorithm that lets
    5·1 answer
  • Class ____________ allow you to create one version of a class, without having to replicate code to handle multiple data types.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!