CISC 121 Lecture Notes - Lecture 5: Empty String, Newline, English Alphabet

88 views3 pages
Verified Note

Document Summary

Arguments of type int, float, tuple, bool, and str cannot have their values changed by the workings of a function. Arguments of type list and dict, however, may have values of their elements changed by a function. Output print() function is what we typically use for output to screen in this class. It takes a variaty of parameter types and makes sense of them somehow. It can be used to see value of arguments of type int, float, str, bool, list, dict. print( hello, world!") Evidently, the function spaces the values its given out a bit, even if the programmer hasn"t bothered to do so. Default: print() completes output w newline, causing next call to the function to start output one line lower in the output window. However, the function has an optional, specialized end argument that can change the ending to anything you want a line to end with, or an empty string! print( this",end= ")

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