cis122.spr13.wk3d1.post

Cis 122 introduc2on to programming spring 2013

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: >>> x = 1 >>> a = double(x + 1) + double(x + 2) >>> x >>> a CIS 122 Introduc2on to Programming Spring 2013 Another data type  ­ Strings CIS 122 Introduc2on to Programming Spring 2013 Another data type  ­ Strings >>> “97403” ‘97403’ >>> ‘hello, world’ ‘hello, world’ CIS 122 Introduc2on to Programming Spring 2013 Why Func2ons? CIS 122 Introduc2on to Programming Spring 2013 Another data type  ­ Strings >>> “97403” ‘97403’ >>> type(“97403”) <class 'str'> CIS 122 Introduc2on to Programming Spring 2013 Another data type  ­ Strings >>> 97403 97403 >>> Lincoln < error > 2 4/16/13 CIS 122 Introduc2on to Programming Spring 2013 CIS 122 Introduc2on to Programming Spring 2013 Another data type  ­ Strings Another data type – Strings >>> str(97403) ‘97403’ >>> “Lincoln” ‘Lincoln’ •  string operators and func2ons CIS 122 Introduc2on to Programming Spring 2013 CIS 122 Introduc2on to Programming Spring 2013 String operators + and * are overloaded operators >>> “try” + “this” >>> “try this” * 4 + “ok” Strings are sequences of characters •  strings are sequences •  string methods “hello, world” 0 1 2 3 4 5 6 7 8 9 10 11 &...
View Full Document

This note was uploaded on 02/12/2014 for the course CIS 122 taught by Professor Staff during the Spring '08 term at University of Oregon.

Ask a homework question - tutors are online