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
Paraphin [41]
2 years ago
10

Can someone help I think I know it but I wanna make sure I’m right

Computers and Technology
1 answer:
lapo4ka [179]2 years ago
3 0

I think it’s the last one.

You might be interested in
What will you see on the next line? >>> int(6.5)
tankabanditka [31]

Answer:

6

Explanation:

The int functions founds down to the nearest whole number, which in this case would be 6.

8 0
2 years ago
Read 2 more answers
Best programming languages? So far I have only learned html.​
Volgvan

Answer:

it's all up to personal preference some different ones have upsides and downsides but it's more of what you feel is best

4 0
3 years ago
What two names are given to the blinking vertical line?
Paha777 [63]

Answer:

<u>see </u><u>below</u><u>:</u>

Explanation:

One is (the cursor).

Whenever you see a flashing vertical line called-the cursor--you can start typing.Note that the mouse pointer is also called a cursor,but it is shaped differently.The keyboard cursor is also called the insertion point.

5 0
3 years ago
The ease of travel in the twentieth century played a role in the advancement of medicine. Based on this lesson, which statement
Shtirlitz [24]
During the twentieth century, transportation had been very significant and played a great influence in the advancement of medicine. This is because this made health care become more accessible to patients no matter where they are located. The answer for this would be option C.
8 0
3 years ago
Read 2 more answers
Pick the 3 correct Python functions that parse and output only the date and time part of each log in log.txt as follows.
Mila [183]

Answer:

1, 4, 5

Explanation:

parse2:

. In this case it's passing "r" as an argument, which really does absolutely nothing, because whenever you call open("file.txt") it defaults to reading mode, so all you're doing is explicitly passing the "r". So let's look at the first line. Whenever you call str.split() without any arguments, by default it splits it by empty text, and filters any empty text. So str.split() is not the same as str.split(" ") although it has similar behavior. "     ".split(" ") will output ['', '', '', '', '', ''], while "     ".split() will output []. So in this case the line.split() will split the string '10.1.2.1 - car [01/Mar/2022:13:05:05  +0900] "GET /python HTTP/1.0" 200 2222' into the list<em> ['10.1.2.1', '-', 'car', '[01/Mar/2022:13:05:05', '+0900]', '"GET', '/python', 'HTTP/1.0"', '200', '2222'].</em> As you can see the the data is split into two pieces of text, AND they include the brackets in both strings. So when it gets the 3 index and strips it of the "[]" it will have the incomplete date

parse3:

 In this instance the "r" does nothing as mentioned before the "r" is already defaulted whenever you call open("file.txt") so open("file.txt") is the same as open("file.txt", "r"). So in this case we won't be working left to right, we're going inside the brackets first, kind of like in math you don't don't work left to right in equation 3 + 3(2+3). You work in the brackets first (inside brackets you do left to right). So the first piece of code to run is the line.split("[" or "]"). I actually kind of misspoke here. Technically the "[" or "]" runs first because this doesn't do what you may think it does. The or will only return one value. this is not splitting the line by both "[" and "]". The, or will evaluate which is true from left to right, and if it is true, it returns that. Since strings are evaluated on their length to determine if they're true. the "[" will evaluate to true, because any string that is not empty is true, if a string is empty it's false. So the "[" will evaluate to true this the "[" or "]" will evaluate to "[". So after that the code will run line.split("[") which makes the list: <em>['10.1.2.1 - car ', '01/Mar/2022:13:05:05  +0900] "GET /python HTTP/1.0" 200 2222']</em>. Now the [3:5] will splice the list so that it returns a list with the elements at index 3 (including 3) to 5 (excluding 5). This returns the list: [], because the previous list only has 2 elements. There are no elements at index 3 to 5 (excluding 5). So when you join the list by " ", you'll get an empty string

parse4:

  So I'm actually a bit confused here, I thought the "r+" would open the file in read-writing mode, but maybe this is a different version of python I have no idea, so I'm going to assume it is reading/writing mode, which just means you can read and write to the file. Anyways when you split the line by doing line.split(), as mentioned before it will split by empty spaces and filter any empty spaces. This line will return: <em>['10.1.2.1', '-', 'car', '[01/Mar/2022:13:05:05', '+0900]', '"GET', '/python', 'HTTP/1.0"', '200', '2222']</em>. and then you splice the list from indexes 3 to 5 (excluding 5). This will return the list: <em>['[01/Mar/2022:13:05:05', '+0900]']</em> which has the two pieces of information you need for the date. Now it joins them by a space which will output: '[01/Mar/2022:13:05:05 +0900]'. Now when you strip the "[]" you get the string: '01/Mar/2022:13:05:05 +0900' which is the correct output!

parse 5:

 So in this example it's using re.split. And the re.split is splitting by "[" or "]" which is what re.split can be used for, to split by multiple strings, which may be confused by string.split("[" or "]") which is not the same thing as explained above what the latter does. Also the reason there is a backslash in front of the [ and ] is to escape it, because normally those two characters would be used to define a set, but by using a \ in front of it, you're essentially telling regex to interpret it literally. So in splitting the string by "[" and "]" you'll get the list: <em>['10.1.2.1 - car ', '01/Mar/2022:13:05:05  +0900', ' "GET /python HTTP/1.0" 200 2222']</em> which has 3 elements, since it was split by the [ and the ]. The second element has the date, so all you need to do is index the list using the index 1, which is exactly what the code does

8 0
1 year ago
Other questions:
  • The analog signals that carry analog or digital data comprise composites built from combinations of simple sine waves.
    12·1 answer
  • Type the correct answer in the box spell all words correctly
    8·1 answer
  • From an IT perspective, which of the following best describes BI and BI apps?
    13·1 answer
  • In order to use an object in a program, its class must be defined.
    9·1 answer
  • _____ is the software that protects you computer from harmful files, Trojan horses, and worms.
    13·2 answers
  • If my_string = "This is MY string!", why does print (my_string[0:7:5]) return "Ti" and not
    11·1 answer
  • Complete the following statement: Sustainability is: Choose all that apply.This task contains the radio buttons and checkboxes f
    10·1 answer
  • What happens when two computers have the same IP address?
    13·1 answer
  • What does the history feature in a web browser do
    10·1 answer
  • Please help me I don't understand. It's Python.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!