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
tiny-mole [99]
3 years ago
10

Write a program that reads a string from the user containing a date in the form mm/dd/ yyyy. It should print the date in the for

m April 12, 2017. Hint: Get the "mm" from the user entered date "mm/dd/yyyy", then convert the "mm" into a month number. You may use an list month_list
Computers and Technology
1 answer:
Oxana [17]3 years ago
3 0

Answer:

months_info = ['January', 'February','March','April', 'May','June', 'July','August', 'September', 'October', 'November', 'December']

date = input('Enter a date using the mm/dd/yyyy format ')

m, d, y = date.split('/')

m = int(m) - 1

name_of_month = months_info[m]

print('{} {}, {}'.format(name_of_month, d, y))

Explanation:

  • Create a list of all months and store them in the months_info variable.
  • Get the date as an input from user and then split the date.
  • Finally display the date by following the specific layout using the built-in format method.
You might be interested in
WILL GIVE BRAINLIEST!!!!!!!
stellarik [79]
True











Dhahvdbdbrhhehebdbdbbdbd sorry it has to be longer ahhshdjdjhsjdjdbdnbfbfjfj
7 0
2 years ago
Read 2 more answers
To reduce the number of used digital outputs of the microcontroller, the display board is connected to the main board through th
Luda [366]

Answer:

The program in Python is as follows:

BCD = ["0001","0010","0011","0100","0101","0110","0111"]

num = input("Decimal: ")

BCDValue = ""

valid = True

for i in range(len(num)):

   if num[i].isdigit():

       if(int(num[i])>= 0 and int(num[i])<8):

           BCDValue += BCD[i]+" "

       else:

           valid = False

           break;

   else:

       valid = False

       break;

if(valid):

   print(BCDValue)

else:

   print("Invalid")

Explanation:

This initializes the BCD corresponding value of the decimal number to a list

BCD = ["0001","0010","0011","0100","0101","0110","0111"]

This gets input for a decimal number

num = input("Decimal: ")

This initializes the required output (i.e. BCD value)  to an empty string

BCDValue = ""

This initializes valid input to True (Boolean)

valid = True

This iterates through the input string

for i in range(len(num)):

This checks if each character of the string is a number

   if num[i].isdigit():

If yes, it checks if the number ranges from 0 to 7 (inclusive)

       if(int(num[i])>= 0 and int(num[i])<8):

If yes, the corresponding BCD value is calculated

           BCDValue += BCD[i]+" "

       else:

If otherwise, then the input string is invalid and the loop is exited

<em>            valid = False</em>

<em>            break;</em>

If otherwise, then the input string is invalid and the loop is exited

<em>    else:</em>

<em>        valid = False</em>

<em>        break;</em>

If valid is True, then the BCD value is printed

<em>if(valid):</em>

<em>    print(BCDValue)</em>

If otherwise, it prints Invalid

<em>else:</em>

<em>    print("Invalid")</em>

7 0
3 years ago
When installing a SATA hard drive, is it true or false that you need to move the jumpers on the back of the drive to instruct th
antiseptic1488 [7]

Answer:

This is false.

Explanation:

SATA drives do not have jumpers, because they don't use the master/slave feature. They are connected to the motherboard, and they are ready to work.

The master/slave feature was used by IDE hard drives.15 years ago, most motherboards didn't have too many IDE slots to place more than 1 or 2 HDDs, the IDE cable allowed you to connect 2 drives to 1 cable, greatly increasing your computer's storage space.

It was recommended to set as master the drive connected directly to the motherboard, and the other one as slave.

7 0
3 years ago
You can edit existing conditional formatting _____ from the conditional formatting rules manager dialog box.
Lera25 [3.4K]
I believe the term you're looking for would be "rules" 
send me a message if not true.
7 0
3 years ago
HELP ME PLEASE <br> Can you help get back my ro blox account: (LOLCrashForce)
abruzzese [7]

Answer: sorry we cannot help

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • If you were optimizing for performance and wanted to support potentially adding many new elements to an adt, then:
    12·1 answer
  • What can web designers use to control the individual web page layouts for all of the pages on a website?
    7·1 answer
  • How many currencies do recognize?
    8·1 answer
  • 1. A device that can be used to insert data into a computer or other computational devices is
    6·2 answers
  • Mathematical expression that might link numbers in cells
    14·1 answer
  • ________________are programs that designed to help users to be more productive with their personal tasks
    11·2 answers
  • All of the following are ways to limit what is tracked about you online, except:
    12·1 answer
  • What is the name of the advanced warrior race of robots in Doctor Who?
    10·2 answers
  • Edison wants to purchase a new computer and go to the Caribbean for spring break. The computer is priced at $1,299, and the vaca
    15·1 answer
  • Which solution eliminates the need for dedicated high-speed WAN connections between sites
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!