python programming concepts Flashcards
selection
used to make choices depending on the information given
sequence
the order in which commands are executed by a computer
types of selection
- IF…THEN…ELSE…ENDIF
2. CASE..OF…OTHERWISE…ENDCASE
when is the IF condition used in python programming?
An if else Python statement evaluates whether an expression is true or false. If a condition is true, the “if” statement executes. Otherwise, the “else” statement executes
when is the CASE..OF condition used in python programming?
A series of statements (options) are programmed to take into account the testing of a condition that may have many outcomes.
counting
counting is used to find how many numbers/ items are in a list. it is used to keep track of how many iterations your program has performed in a loop.
counter == counter + 1
totaling
sum a list of numbers
total == total + 1
loop
In computer programming, a loop is a sequence of instructions that is continually repeated until a certain condition is reached.
iteration
iteration is the term given to the repetition of a block of statements until a condition is met.
types of iteration
- FOR…TO…NEXT
- REPEAT…UNTIL
- WHILE…DO…ENDWHILE