The answer is A. The status bar.
Can you please show the answers to them? I don't want to get your assignment wrong.
Answer:
213
Explanation:
The given parameters are;
The network on which the host is on = 192.168.146.0
The subnet mast = 255.255.255.0
The binary value of the host portion = 11010101
To convert the binary value to decimal value, we proceed by multiplying each of the digits of the binary value by the corresponding power of 2, from the left to right, starting from a power of 0, and sum the result, as follows;
(11010101)₂ = (1×2⁷ + 1×2⁶ + 0×2⁵ + 1×2⁴ + 0×2³ + 1×2² + 0×2¹ + 1×2⁰)₁₀
1×2⁷+1×2⁶+0×2⁵+1×2⁴+0×2³+1×2²+0×2¹+1×2⁰= 128+64+0+16+4+1 = 213
∴ (11010101)₂ = (213)₁₀
The decimal value of 11010101 is 213.
Answer:
B. string -> (int -> int)
Explanation:
We are going to perform comparison operations '->'. It is important to notice that the comparison operation gives us a bool value (True or False) and the comparison operation is legal if and only if the data types to be compared are the same.
Example:
int(4)->int(5) False
int(4)->int(4) True
int(4)->string(4) Error, data types don't match
For this reason:
- A. Is legal because float -> float evaluates to True, True is a boolean value and bool -> bool is legal because both are the same data type.
- B. Is illegal because int -> int evaluates to True, True is a boolean value and string is not a boolean (string -> bool).
- C. Is legal because int is the same type than int.
- D. Is legal because the list is the same type than list regardless it's content.
Note:
The operations inside parentheses are evaluated first.
List is a type by itself regardless of its content.