CMPT 120 Lecture Notes - Lecture 8: Duplicate Code

27 views1 pages
meghan78 and 39786 others unlocked
CMPT 120 Full Course Notes
29
CMPT 120 Full Course Notes
Verified Note
29 documents

Document Summary

Basic: what"s (cid:373)ost popular: simply propose the most popular. Advanced: people like you also like: a field that allows us to predict the future, \n = new line. Loops: one big usage is to avoid code duplication, avoid copy/paste, for . I(cid:374: on every loop iteration, the variable takes on the value of items in the list you designated it to. Notes: str = designating a string when printing it with something else, range = expands to a list of numbers from 0 to range minus 1, example: loop with list of numbers, string, example (cid:862)hello(cid:863) Integer or int: example (cid:862) 7(cid:863, float.

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