Week 5 Notes
Week 5 Notes CS 1110-002
Popular in Intro to Computing using Python
verified elite notetaker
Popular in ComputerScienence
This 1 page Class Notes was uploaded by Eunice on Saturday February 27, 2016. The Class Notes belongs to CS 1110-002 at Cornell University taught by Lee, Van Loan in Spring 2016. Since its upload, it has received 18 views. For similar materials see Intro to Computing using Python in ComputerScienence at Cornell University.
Reviews for Week 5 Notes
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 02/27/16
CS 1110 Van Loan and Lee Spring 2016 February 23, 2016 Counting, find, replace o count and find: returns int values o replace overlap of strings the produce is a string that is different from the original original remains unchanged overwrite: s=replace(s1,s2) methods: upper or lowercase also: o s.isalnum: all numbers or alphabet o s.isalpha: all alphabetical o s.isdigit:all numbers o string module characters, letters, punctuation, numbers o iteration repeating a script using loops for: for a certain object in another object, do a certain execution for x in y: o LOOP BODY o February 25, 2016 iterating through a string vs is a range o letters/characters/string: “for c in s”: do thing in loop body o number/quantities: “for k in range(n)”: do thing in loop body counting: a type of summation o “for k in range(): print k” o “for k in range (1,n): print k” o “for k in range(there, here, -1): print k” this counts backwards
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'