Which of the following would not be considered a stop word?
At |
||
We |
||
Output |
||
These |
A Python program can work with which of the following values?
Numbers |
||
Strings of characters |
||
Booleans |
||
All of the above |
3.
Which of the following would be described as a “float” in Python?
True |
||
140 |
||
14.0 |
||
‘rootbeer’ |
4.
Which of the following strings has been written correctly?
“Hello World! |
||
Hello World! |
||
‘Hello World!” |
||
‘Hello World!’ |
5.
What would be the result of 8 % 4 in Python?
2 |
||
84% |
||
0 |
||
False |
1. Stopwords are those words that does not add any meaning to a sentence. If we ignored them, the sentence can't change it's meaning.
So from the following.
At, We and These are stopwords as we can remove these words without chnging meaning of the sentences.
Output is not a stopword.
Answer C. Output
You can also check stopwords by downloading it's library in python.
2. Python programs can work with numbers, string of characters, boolean datatype etc.
So all from the given option can be true
Answer D. All of the above
3. if we write
result = True;
print(float(result))
Then it will print 1.0 So, python considered True as a float.
14.0 is a float number.
140 in float will be 140.0
‘rootbeer’ is a string and we can't convert it to float.
print(float('rootbeer')) will gives an error.
Answer D. 'rootbeer'
4.
if string is in quotation mark(both side) then it can be considered as valid.
"Hello World! -- We have no ending quotation marks.
Hello World! -- It has no any quatation marks
'Hello World!" -- Quotation marks are different both the side
'Hello World!' -- It is valid as it is in single quotation both the side..
Answer D 'Hello World!'
5. Modulo operator gives remainder when those both number are divided.
Here we have 8 and 4
8 / 4 = 2 and remainder will be 0.
Thus, result of 8 % 4 = 0
Answer C. 0
Another example 15 % 2 = 1 because (7*2) + 1. When we divide 15 by 2 remainder will be 1. So, 15 % 2 = 1.
Get Answers For Free
Most questions answered within 1 hours.