The python code which can be used to read dates from input, one date per line and each date's format must be as follows: March 1, 1990, is:
<h3>Python code</h3>
import datetime
inputs = []
result = []
#read the inputs
date = input()
inputs.append(date)
while not date == "-1":
date = input()
inputs.append(date)
#check if the input is in the correct format and convert it.
for date_text in inputs:
try:
date_text = datetime.datetime.strptime(date_text,"%d %B, %Y")
result.append(date_text.strftime("%d/%m/%Y"))
except ValueError:
pass
print(*result, sep = "\n")
The above code would parse the string and extract the date. The split() method was used to break the input into tokens.
Read more about python programming here:
brainly.com/question/27666303
#SPJ1
A function you can perform on a word processor BUT NOT on a typewriter is editing.
Answer:
import random
a = random.randint(1,10)
b = random.randint(1,10)
answer = a * b
print (str(a) + " X " + str(b) + " = " + str(answer))
Explanation:
Happy to help you mate
Answer:
here are three basic categories for fire alarm panel signals: trouble, supervisory, and alarm. Trouble Signal. A trouble signal is typically designated by a yellow light and means that there is an operational issue. For some more advanced systems, the panel may indicate the kind of problem and where it is located.
Explanation:
Answer:
Using the DNS service.
Explanation:
The computer sends a UDP packet with the domain name in it to port 53 of the configured DNS server, and expects a reply with the IP address of that domain.