Python - Test Yourself3

An advantage of Pseudo code is that it requires no special
tools and can easily be written on a word processor.

Select one:
 True 
 False






What does the following symbol mean when used in a
flowchart?






Select one:
 a. Input/output 
 b. Decision
 c. Start/End of
process


 d. Sub-routine
process





Pseudo code is a newer tool and has features that make it
more reflective of the structured concepts.

Select one:
 True 
 False





What does the following symbol mean when used in a
flowchart?


Select one:
 a. Sub-routine
process
 b. Decision
 c. Input/Output

 d. Process  

A flowchart with more than 15 symbols is considered poor
form.

Select one:
 True 
 False

An advantage of Pseudo code is that it is a visual
technique.

Select one:
 True
 False







Every flowchart must have a START and STOP symbol.

Select one:
 True 

 False







The use of arrows in flowcharts is optional because the flow
direction is obvious.

Select one:
 True

 False  







Which of the following is NOT one of the rules for pseudo
code:

Select one:
 a. Indent to show
hierarchy
 b. Keep statements
language independent
 c. Write only one
statement per line


 d. Capitalize every
word  







What does the following symbol mean when used in a
flowchart?






Select one:
 a. Start/End of
process
 b. Input/output
 c. Sub-routine
process 


 d. Decision







What
will the output of the following program be?

i=0
while
(i < max(1, 22-4*5, 3*5-3*4, 2**2)):
      i+= 1
print
(i)

Select
one:
 a. 0
 b. 5
 c. 3

 d. 4  







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




What
is the output of the following statements?

pi
= int(3.14159)
print
(pi)

Select
one:
 a. 3
 b. 3.0
 c. 3.14159 

 d. 0







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





No comments:

Post a Comment