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
Answer:
error: incompatible types
Explanation:
Given
The attached code
Required
The output
Variable "a" is declared as float
While p is declared as a pointer to an integer variable
An error of incompatible types will be returned on line 3, <em>int *p = a;</em>
Because the variables are not the same.
To assign a to p*, we have to use type casting.
Hence, (b) is correct
I SURE HOPE IT DOES (this is the best vibe if you dont get this you are an uncultured swine)
Answer:
FALSE
Explanation:
Because C1 and C2 implement the same interface, they both implement whichIsIt. The variable c is known as a polymorphic variable, meaning that it can change from being an C1 to a C2. So, the message c.whichIsIt( ); may invoke C1's whichIsIt or C2's whichIsIt. This can only be known at runtime.