MIS 304 Lecture Notes - Lecture 8: Augmented Assignment

57 views2 pages

Document Summary

Places code in a structure that makes the computer repeat it as many times as necessary. Uses a true/false condition to control the number of times it repeats. Statement or set of statements repeated as long as condition is true. Iteration: each execution of the body of a loop. Pretest loop: tests its condition before performing an iteration. Infinite loop: continues to repeat until the program is interrupted. General format for variable in [value1, value2, value3]: Target of an assignment at the beginning of each loop iteration. List: a comma-separated sequence of data items that are enclosed in a set of brackets. Range function: simplifies writing a count-controlled for loop by creating an iterable. Contains a sequence of values that can be iterated over with something like a loop for variable in range(iterable) Generates iterable sequence of integers up to but not including the number. Variable that is used to accumulate total of numbers.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents