Answer:
a. You are eligible to vote.
Explanation:
If Age >= 18 Then
Write "You are eligible to vote."
Else
Set - Age
Write "You can vote in " + Years + " years."
End If
The above code block is an example of if-else code block. The if-else code block follow a pattern of:
If (expression) then
else
(expression)
end if
Based on the if Age>= 18 condition, the output will be "You are eligible to vote."
Answer:
a) Open the DNS settings on your router and try using a different DNS.
Explanation:
The DNS or domain name service is a protocol that majorly assigns a URL string to an IP address. This is because the IP address as a number is easily forgotten.
In the question above, the operator could not access the websites with the URL name but can confirm connectivity to the site with its IP address. This means that the IP address can be used to access the websites directly, so, the DNS protocol is either not configured or is down.
Answer:
If a method does not return a value, the return-value-type in the method declaration can be omitted.
Explanation:
If a method does not return a value, the return-value-type in the method declaration can be omitted is a false statement.
Answer:
a[i] = a[len(a) - i - 1]
Explanation:
Based on the definition of corresponding elements above,
First element of a list and last element are corresponding :
Using this :
Given a list defined as 'a'
First element of list is at index 0
Last element of a list is at index ; len(a) - 1
For a list containing 10 elements:
Second element corresponds to second to the last element
Second element is at index 1;
Second to the Last element is at index 8
(since indexing starts from 0)
Second element = a[1]
Second to the last element = a[len(a) - i - 1]
Hence,
a[i] = a[len(a) - i - 1]