CMPSC 121 Study Guide - Final Guide: Tuple, Type Conversion, Backslash

248 views14 pages
10 May 2017
School
Course

Document Summary

Varia(cid:271)les: valid varia(cid:271)les that (cid:272)ould (cid:271)e used in python . *cannot included spaces or special characters in variable. Special built-in functions are also prohibited as shown below . True class try nonlocal elif lambda and continue while from else not as def for in if or. Escape characters: different combinations involving the backslash symbol (\) can be used to manipulate a print statement. D es cription addition s ubtraction and negation multiplication divis ion floored divis ion (rounds down) modulo (remainder) exponentiation. Strings: a string is a text that is surrounded by a quotation mark. You can find the length of a string by using len(). Once a string is created in a variable, you cannot change it by adding another code. *whitespaces are included when counting for the length. A programmer can access the location of a string by using the brackets ([ ]). Tri(cid:374)g co(cid:374)(cid:272)ate(cid:374)atio(cid:374): the pro(cid:272)ess of (cid:272)o(cid:373)(cid:271)i(cid:374)i(cid:374)g o(cid:374)e or (cid:373)ore stri(cid:374)gs together .

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

Related Documents