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:
- var today = new Date();
- var dateComp = [];
- dateComp[0] = today.getDate();
- dateComp[1] = today.getMonth();
- dateComp[2] = today.getFullYear();
-
- switch(dateComp[1]){
- case 0:
- console.log("Jan " + dateComp[0] + "," + dateComp[2])
- break;
- case 1:
- console.log("Feb " + dateComp[0] + "," + dateComp[2])
- break;
- case 2:
- console.log("Mar " + dateComp[0] + "," + dateComp[2])
- break;
- case 3:
- console.log("Apr " + dateComp[0] + "," + dateComp[2])
- break;
- case 4:
- console.log("May " + dateComp[0] + "," + dateComp[2])
- break;
- case 5:
- console.log("Jun " + dateComp[0] + "," + dateComp[2])
- break;
- case 6:
- console.log("Jul " + dateComp[0] + "," + dateComp[2])
- break;
- case 7:
- console.log("Aug " + dateComp[0] + "," + dateComp[2])
- break;
- case 8:
- console.log("Sept " + dateComp[0] + "," + dateComp[2])
- break;
- case 9:
- console.log("Oct " + dateComp[0] + "," + dateComp[2])
- break;
- case 10:
- console.log("Nov " + dateComp[0] + "," + dateComp[2])
- break;
- case 11:
- console.log("Dec " + dateComp[0] + "," + dateComp[2])
- break;
- }
Explanation:
The solution code is written in JavaScript.
Firstly, create a Date object (Line 1). The date object will automatically capture the current date and time.
Next create an array dateComp to hold the day, month and year (Line 3 -5). We use the getDate method to get current day, getMonth method for current month and getFullYear method for current year.
This is important to note that the getMonth method will return the value range from 0 - 11 with the Jan is represented as 0, Feb is 1 and so forth. Presume we intend to display the date using the format "month day, year", we can create a switch structure to check the month value which is range from 0 to 11. If month value is 0, generate string Jan + current day + "," + current year. We generate the date string based on different switch cases (7 - 44). We shall see the output similar to the date string as shown below:
Apr 12,2020
Complete Question:
1. A wireless technology standard for exchanging data over short distances
2. A particular brand of mobile phone/PDA
3. A network that operates over a limited distance, usually for one or a few users
1. Bluetooth
2. PAN
3. Blackberry
Answer:
1. Bluetooth 2. Blackberry . 3. PAN
Explanation:
1. Bluetooth is a wireless technology standard, used in order to exchange data between mobile devices, like smartphones, tablets, headsets, wearables, over short distances in a one-to-one fashion (which means that it is not possible to build a network based in Bluetooth).
2. Blackberry is a brand of mobile phones/PDAs, very popular a decade ago, because it was the first one to allow mobile users to access e-mails and messages from anywhere, at any time.
3. PAN (Personal Area Network) is an ad-hoc network that it is only available for data exchange at a very short distance, within the reach of a person, i.e. a few meters as a maximum.
It is thought to allow someone to interact with his nearest environment (laptop, tablet, PDA) and it can be wireless (like Bluetooth) or wired (via USB cables).
Answer:
The internet is considered as Wide Area Network (WAN).
That means that the production vause a loss in supply and demand