Question

Which of the following would not be considered a stop word? At We Output These A...

  1. Which of the following would not be considered a stop word?

    At

    We

    Output

    These

  2. A Python program can work with which of the following values?

    Numbers

    Strings of characters

    Booleans

    All of the above

3.

  1. Which of the following would be described as a “float” in Python?

    True

    140

    14.0

    ‘rootbeer’

4.

  1. Which of the following strings has been written correctly?

    “Hello World!

    Hello World!

    ‘Hello World!”

    ‘Hello World!’

5.

  1. What would be the result of 8 % 4 in Python?

    2

    84%

    0

    False

Homework Answers

Answer #1

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.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. Type in the following program. Compile and run. #include <iostream> using namespace std; int main()...
1. Type in the following program. Compile and run. #include <iostream> using namespace std; int main() { ​cout << "Hello, world." << endl; } Open a Word Document and copy and paste the program and the output. 2. Create a new program: #include <iostream> using namespace std; int main() { ​float num1; ​float num2 ​float avg; ​cout << "Enter two numbers" << endl; ​cin >> num1 >> num2; ​avg = num1 + num2/2; ​cout << "The average is " <<...
For each of the following Python programs P and input strings I, give the output P(I),...
For each of the following Python programs P and input strings I, give the output P(I), using the formal definition of P(I) given, and employing any reasonable reference computer C: Definition of P(I), the output of a Python program. Let P be a Python program with respect to a reference computer system C. Suppose P has main function M, and let I be a string of ASCII characters that will be used as input to P. The output of P...
Write a JAVA program that reads in a string from standard input and determines the following:...
Write a JAVA program that reads in a string from standard input and determines the following: - How many vowels are in the string (FOR THE PURPOSE OF THIS PROGRAM 'Y' is NOT considered a vowel)? - How many upper case characters are in the string? - How many digits are in the string? - How many white space characters are in the string? - Modify the program to indicate which vowel occurs the most. In the case of a...
** Language Used : Python ** PART 2 : Create a list of unique words This...
** Language Used : Python ** PART 2 : Create a list of unique words This part of the project involves creating a function that will manage a List of unique strings. The function is passed a string and a list as arguments. It passes a list back. The function to add a word to a List if word does not exist in the List. If the word does exist in the List, the function does nothing. Create a test...
In Python: This will require you to write several functions, and then use them in a...
In Python: This will require you to write several functions, and then use them in a program. Logical Calculator The logical calculator does math, but with logical operators. In logic, we represent a bit with 0 as false and a bit with 1 as true. The logical operators are NOT, AND and OR. Bitwise logical calculations operate on each bit of the input. The NOT operator works on just one three-bit argument. NOT 011 = 100 The AND operator works...
Module 4 Assignment 1: Pseudocode & Python with Variable Scope Overview Module 4 Assignment 1 features...
Module 4 Assignment 1: Pseudocode & Python with Variable Scope Overview Module 4 Assignment 1 features the design of a calculator program using pseudocode and a Python program that uses a list and functions with variable scope to add, subtract, multiply, and divide. Open the M4Lab1ii.py program in IDLE and save it as M4Lab1ii.py with your initials instead of ii. Each lab asks you to write pseudocode that plans the program’s logic before you write the program in Python and...
Here is the code I am supposed to Analyze: // If we want to use the...
Here is the code I am supposed to Analyze: // If we want to use the Scanner class (type) to get user input, we need // to import the following Java package that includes the Scanner class // definitions. We do not have to add an import statement to use the // print() or println() methods of the System object, because they // are built in. import java.util.Scanner; public class PRG420Week1_AnalyzeAssignment { /* The main() method you see below is...
Create a Python main program which calls two functions enterNum and calcResult and accomplishes the following:...
Create a Python main program which calls two functions enterNum and calcResult and accomplishes the following: 1. The main program calls the function enterNum 3 times. The first time enterNum is called, the main program stores the returned output in the variable xx. The second time, the returned output is stored in the variable yy and the third time in zz. 2. enterNum asks the user to enter a floating point number. This function has no input arguments and returns...
Which of the following does not describe an expenditure that would be considered an asset improvement?...
Which of the following does not describe an expenditure that would be considered an asset improvement? a. routine cost to restore equipment to its ordinary operating condition after an accident b. install hardware that will increase the equipment's rate of output c. upgrade motor to decrease equipment's operating cost d. installation of a new battery system to allow for longer useful lives of office equipment
4. Which of the following would be considered a direct material cost? A. Rubber used in...
4. Which of the following would be considered a direct material cost? A. Rubber used in the manufacture of tires B. Wages paid to bakers in a bakery. C. Employee overtime D. Glue used in the production of sofas.