Question: 1- What output will the following python command produce: >>> print (1,000,000) Select one: a. 1,000 b. 1,000,000 c. 1 0 0 d. Error invalid

1- What output will the following python command produce:

>>> print (1,000,000)

Select one:

a. 1,000

b. 1,000,000

c. 1 0 0

d. Error invalid type

2- What output will the following python commands produce:

>>> n = 17

>>> print (n)

Select one:

a. (n)

b. 17.0

c. n

d. 17

3- What output will the following python command produce:

>>> percentage = ( 60 * 100) // 55

>>> print (percentage)

Select one:

a. percentage

b. 109

c. 109.0909090909091

d. 109.0

4- What output will the following python commands produce:

>>> print (2 * (3-1))

Select one:

a. 6

b. 5

c. 4

d. 3

5- What output will the following python commands produce:

>>> print ((1+1)**(5-2))

Select one:

a. 16

b. 8

c. 4

d. 2

6- What output will the following python commands produce:

>>> print (2*3-1)

Select one:

a. 6

b. 5

c. 4

d. 3

7- Match concepts with their definition!

Expression | Float | Concatenate | Operator | Evaluate | Assignment statement | Operand | Integer division | Statement | Int | Keyword | Variable | Value | Comment | Rules of precedence | Data type | Str | Composition | Variable name

-A statement that assigns a value to a name (variable). Answer 1:

-Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. Answer 2:

-The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely. Answer 3:

-To join two strings end-to-end. Answer 4:

-A set of values. Answer 5:

-To simplify an expression by performing the operations in order to yield a single value. Answer 6:

-A combination of variables, operators, and values that represents a single result value. Answer 7:

-A Python data type which stores floating-point numbers. Answer 8:

-A Python data type that holds positive and negative whole numbers. Answer 9:

-An operation that divides one integer by another and yields an integer. Answer 10:

-A reserved word that is used by the compiler to parse programs. Answer 11:

-One of the values on which an operator operates. Answer 12:

-A special symbol that represents a simple computation like addition, multiplication, or string concatenation. Answer 13:

-The set of rules governing the order in which expressions involving multiple operators and operands are evaluated. Answer 14:

-An instruction that the Python interpreter can execute. Answer 15:

-A Python data type that holds a string of characters. Answer 16:

-A number or string (or other things to be named later) that can be stored in a variable or computed in an expression. Answer 17:

-A name that refers to a value. Answer 18:

-A name given to a variable. Answer 19:

8- Programmers generally choose names for their variables that are meaningful and document what the variable is used for.

Select one:

True

False

9- Variable names are not case sensitive.

Select one:

True

False

10- Using keywords for variable names will result in a ________________

Select one:

a. runtime error

b. compile error

c. syntax error

d. semantic error

11- A script usually contains a sequence of statements. If there is more than one statement, the results appear one at a time as the statements execute.

Select one:

True

False

12- An expression is a combination of values, variables, and operators. If you type an expression on the command line, the interpreter evaluates it and displays the result.

Select one:

True

False

13- In a script, an expression all by itself is a legal statement, but it doesn't do anything.

Select one:

True

False

14- The acronym PEMDAS is a useful way to remember the order of operations in Python.

Select one:

True

False 15- As programs get bigger and more complicated, they get more difficult to read. This is why programmers should use Comments in their code.

Select one:

True

False 16- What output will the following python command produce:

percentage = ( 60.0 * 100.0 ) / 55.0

print (percentage)

Select one:

a. percentage

b. 109

c. 109.0909090909091

d. 109.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!