Introduction to programming using python--Hello World chapt. 7,8,9,11,12,13

¡Supera tus tareas y exámenes ahora con Quizwiz!

v. What is the correct description for and?

All must be true to be true

Which of the three problem solving techniques did Sherlock Holmes use?

Analytical

u. What are the logical combinations in Python?

And, or & not

What is it called when you diagram with Yes\No the problem solution?

Decision Tree

s. What is elif short for in Python?

Else-if

True/False A """without a name is a Python comment.

False

True/False Comments are for the computer to execute.

False

True/False Comments can go at the middle of a line.

False

True/False Should you use the """ for comments in Python.

False

True/False There are hard-and-fast rules for what you should have in comments.

False

j. True/False In Python indenting is just a matter of style.

False

l. True/False As long as it is indented it does not need to be the same amount in a block.

False

m. True/False The == and the = are the same in Python.

False

p. True/False Chaining of < and > such as 9< a > 15 is not allowed.

False

branch

What is a possible sequence from the initial state?

process in which we try to determine any constraints that will be faced in developing a solution

What is a preliminary analysis?

complete set of possible states

What is a problem state?

combinational explosion

What is it called when the possible moves sequences grows rapidly?

What keystrokes will end or interrupt an infinite loop in Python?;

cntrl-c

What is it called when an algorithm is translated in to a program?

coding

What are the "notes" on a program called?

comments

n. Testing or checking is also called ________ in Python.

comparing

q. A _____ is also called a conditional test or logical test.

comparison

What type of loop repeats until a certain thing happens?;

conditional

Fixed numbers are also called ______.

constants

A list in Python is a "_____".;

container

What stops executing the current iteration?;

continue

What type of loop repeats a certain number of times?;

counting

What stops executing the current loop?;

break

f. A ____ of code is one or more lines of code that are grouped together.

block

What is not a comment but can be similar to a comment?

""" with no name

What symbol makes a line a comment?

#

What can allow an expression over multiple line?

()

What is the first number generated of range(8)?;

0

What is the default step of range()?;

1

What is necessary in an algorithm?

1. that it specify a behavior in such a way that at any point, there is no doubt about what should be done or how to do it givens

What is the first number generated of range(10,15)?;

10

What is the last number generated of range(10,15)?;

14

k. What is the convention of indentation in Python?

4 spaces

What is the last number generated of range(8)?;

7

g. What at the end of a line tells Python a block of instructions is coming next?

:

o. What is another name for the comparison operators?

Relational operators

variants , invariants

Specifying _________ and ___________ can help identify and constrain the resources of a problem.

e. How do you identify a block of code in Python?

The indentation

True/False A conditional loop loop will keep looping while the test is ?;

True

True/False A string is a list of characters;

True

True/False Comments can go at the beginning of a line.

True

True/False Comments can go at the end of a line.

True

True/False The more time you spend problem solving before you start coding, the less overall time it will take to get the software to work properly.

True

True/False Variables can be used for the limit of range().

True

True/False Within the body of a loop (block) we can place other blocks with loops.

True

a. True/False Programs need to be able to make decisions on what to do.

True

h. True/False The block includes every line that is indented until they are not indented.

True

i. True/False What does the test need to be to be execute the block of Python instructions from an if?

True

y. True/False and, or & not are operators

True

c. What are the two possible answers for each test?

True and false

States

What are the "points" in a problem space?

depth-first and breadth-first

What are the two strategies for state-graph solutions?

d. What is doing tests and making decisions based on the results called?

branching

ply

What is the technical term for a move/counter-move pair.

root

What is the term used for the final state?

blind

What type of hacking is very susceptible to wasting time and resources?

when there are not too many steps

When is hacking a good approach to problem solving?

informed

Which type of hacking "prunes" the useless branches from a search tree?

What character in Python can be used to extend a line to the next?

\

For each iteration of an outer loop the inner loop goes through ___ of its iterations.

all

w. What is the correct description for or?

any need to be true

_____ are the values that you put inside the () when you call a function.;

arguements

What are the two types of hacking?

blind and informed

Comments are part of a programs ____________________

documentation

t. What is the false option with with if in Python?

else

What is a good use of nested loops?

figuring out all the possible permutations and combinations of series of decisions Decision TRee

The _____ in loop uses a list of values.;

for

What type of loop in Python is a counting loop?;

for

What are the inputs to a problem?

givens

What is another name for the initial conditions of a problem?

givens

Is the top-down given-to goals or goals-to-givens?

givens-to-goals

What is another name for the desired state?

goal or goals

What are the outputs of a problem?

goals

What is reverse hacking?

goals-to-givens

What are the three distinct approaches to problem solving?

hacking, analytical & analogical

What is another name for a runaway or endless loop?;

infinite

Each time through the loop is called a(n)______.;

iteration

r. In programming ____ refers to something where the answer is either true or false.

logical

A _____ is computer program that repeats the same steps over and over again.;

looping

A ______ loop is a loop inside another loop.

nested

x. What is the correct description for not?

opposite comes out

What makes problem solving in our daily problems difficult?

our givens, goals and resources are unclear

The top-down approach is very helpful in writing an _____________.

outline

What is a common debugging method?

printing of values in loops

What in Python allows us to generate a list of values?;

range

What are the inner workings of a problem?

resources

What are the means or methods that can transform a problem state in order to move, step by step, from givens to goal(s)

resources

A while loop uses a _____ to decide when to stop a loop.;

test

b. To make decision, programs check or do a ____to see if a certain condition is true or not.

test

What is the 3rd argument or extra argument of range()?;

the step

___________ decomposes a problem into sub-problems.

top-down

What is another name for what Caesar called "divide and conquer"?

top-down decomposition

What is another name for hacking?

trial-and-error

What type of loop is a conditional loop?;

while


Conjuntos de estudio relacionados

AP1 Ch. 10 Muscle Tissue Physiology

View Set

Chapter 14: Multirisk Management Contracts: Auto

View Set

Abdominal 3, Prostate/***** Anatomy and Physiology

View Set

Embargo advantage and disadvantage

View Set