CSC108H1 Lecture : october 03 notes

49 views2 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

Every value in python has a truth associated with it. 54 [100] creates a new int value, doesn"t change the original int x = x * 2. # does not return; the new int. value associated with x not called upon. # x does double because local memory deletes after function completes. >>> name = raw_input( please enter our name ) >>> ou in colour true #gives a boolean result. >>> # loop over characters in a string: loops. >>> for sample in snd: # for in : #make variable same refer to the first item, then execute body of loop. #make variable sample refer to the second item, the execute body of loop . Print char m y s t r i n g. >>> for ch in s: #ch can be any character. Print ch*5, mmmm yyyyy sssss ttttt rrrrr iiiii nnnnn ggggg.

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