Answer:
Read the file and save it to a variable as a string, split the string variable and cast it to a set object using the set function to get the unique words in the file. Then use the max function with the key attribute to use regular expression module "re" to compare the first letter of each item to return in a list comprehension or append to a list.
Explanation:
The open function is used to import a file in python, the split string method splits the string to a list of items and the set function removes any duplicates of a word or item.
Using the for loop statement, iterate over the items and compare and return the items in alphabetical order with the 're' search method getting the item with uppercase letters with higher precedence than lowercase.
Answer:
The student’s actual bed is 75 inches long
Explanation:
Here in this question, we want to find out the length of the student’s actual bed.
The ratio of the model to the real is 1:25
Let the actual length of the bed be x inches
Thus;
1/25 = 3/x
By cross multiplying
1 * x = 3 * 25
x = 75 inches
Answer:
twos complement value is (-2^15 -1) -32768 to 32767.
excess notation value is -32768 to 32767.
unsigned binary value is (2^16) 0 to 65535
Explanation:
Excess notation: used to represent signed integers. Always uses fixed number of bits with leftmost representing the sign.
Twos complement notation: As opposed to excess notation, a sign bit of 0 is used to represent the non-negative (+) sign and a 1 for the negative (-); again, zero is included in the non-negative set.
Unsigned Binary values: are binary values/bits that don't have signs
Answer:
Option a is the correct answer for the above question
Explanation:
The derived class is a class that inherits the property of the base class, and he can access the public variable and function or members of the base class or ancestor class.
Option 'a' also states the same and the question asked about the assessment of the derived class. Hence option a is the correct answer while the other is not because:-
- Option b states about the private members, but it is not accessible by the derived class.
- Option c states about the derived class members but it can also access the base class members.
- Option d none of the above, but option a is the correct answer.