CISC 101 Study Guide - Final Guide: Macos, Newline, Binary File

625 views38 pages

Document Summary

Repetition can be done through : repeat 7 times : Finite has some sort of counter to keep track: for loops for some type of action, do the loop multiple times, while loop if condition is still satisfied (ex. Finish if music is still playing, repeat and keep going. [0, 1, 2] (up to but not including 3) Indicates how many times you want to run this code. Writing a loop in python for i in range(3): i = 0 loop back to beginning i = 1 loop again back to beginning i = 2 loop back, see list over, end the loop. Print ( the value of i is , i) 255: max = range 1 (index) Prints : the value of i is 0. Pets = [ cat" , dog" , horse" , bunny" ] Print ( the pet at index , i , is , pets [i] ) The pet at index 0 is cat.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents