Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 A function that returns an integer value greater than 0 is called a boolean function. Select one: True False ---------------------------------------------------------- Question 2 Encapsulation

Question 1

A function that returns an integer value greater than 0 is called a boolean function.

Select one:

True

False

----------------------------------------------------------

Question 2

Encapsulation is the process of wrapping a piece of code in a function

Select one:

True

False

----------------------------------------------------------

Question 3

Repeated execution of a set of programming statements is called repetitive execution.

Select one:

True

False

-----------------------------------------------------------

Question 4

A development approach that that is intended to avoid a lot of debugging by only adding and testing small amounts of code at a time is called.

Select one:

a. structured development

b. incremental development

c. unit testing

d. Systems development life cycle

--------------------------------------------------------

Question 5

What output will the following code produce?

def area(l, w):

temp = l * w;

return temp

l = 4.0

w = 3.25

x = area(l, w)

if ( x ):

print (x)

Select one:

a. 13.0

b. 0

c. Expression does not evaluate to boolean true

d. 13

--------------------------------------------------

Question 6

Question text

What output will the following code produce?

n = 10

while n != 1:

print (n,)

if n % 2 == 0: # n is even

n = n // 2

else: # n is odd

n = n * 3 + 1

Select one:

a. 10 5 16 8 4 2

b. None an error will be displayed

c. 8 4 2

d. 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2

------------------------------------------------------------

Question 7

What output will the following statements produce using Python IDLE in interactive mode?

>>> n = 2

>>> n += 5

>>> n

Select one:

a. 7

b. 5

c. 2

d. an error message will occur

------------------------------------------------------------

Question 8

The statements inside of a loop are known as the ____ of the loop.

Select one:

a. body

b. expression

c. counter

d. block

------------------------------------------------------------

Question 9

A loop where the terminating condition is never achieved is called an _______

Select one:

a. infinite loop

b. universal loop

c. while loop

d. for .. ever loop

------------------------------------------------------------

Question 10

Functions can only return Boolean expressions.

Select one:

True

False

------------------------------------------------------------

Question 11

With built in functions, it is generally acceptable to take a "Leap of Faith".

Select one:

True

False

------------------------------------------------------------

Question 12

"Dead code" is code that performs calculations but never displays the results.

Select one:

True

False

-----------------------------------------------------------

Question 13

Boolean expressions control _________________

Select one:

a. recursion

b. conditional execution

c. alternative execution

d. all of the above

-----------------------------------------------------------

Question 14

The modulus operator is the same as the divide operator.

Select one:

True

False

------------------------------------------------------------

Question 15

Chained conditionals are used when there are three or more possibilities.

Select one:

True

False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions