CSC108H1 Lecture Notes - Boolean Expression, Empty String

41 views1 pages
11 Jan 2013
School
Course
yifanyang and 39659 others unlocked
CSC108H1 Full Course Notes
21
CSC108H1 Full Course Notes
Verified Note
21 documents

Document Summary

Print do something here": ex. graduating = (count == o) If average > 79 and graduating: #graduating is a variable or expression that evaluate to. Print do something": 0" = false; all other integer is true, empty string = false; all other stirng is true. >>> l # list l had last item removed. >>> l. pop(: l is a list of strs. >>> l = [3, 3, hello", 6, 8] [3, 3, 6, 8, hello": or, def total_length(l), total_length = 0, for i in range(len(l)), total_length += len(l[i], return total_length. Covert all strings in the list of strings original_list to uppercase: def to_upper(l), for i in range(len(l)), l[i] = l[i]. upper() # does not need to return b/c.

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

Related Questions