# A docstring starts with three singles quotes and ends with single quotes and everything between is the docstring # A docstring at the beginning provides header info -- purpose, author, contact information. We call this the header # comment. # blank lines are used to separate program elements ''' Purpose: demonstrate program user communication Author: Jim Cohoon Email id: jpc ''' # A # starts a SINGLE LINE comment -- everything from the # on is ignored by Python # Send message to program user print( 'Hoos got your back' ) # print() is a BUILT-IN function. BUILT-IN means it's freely available -- you do not need to request access to use ot # a function is a named unit of code. # a function has a name -- in programming languages, the term IDENTIFIER is used for names. # an identifier starts with a letter and can be followed by zero or more letters and numbers. # Python is a global programming language, so it letters from all languages whose encoding had been accepted by the # association # Function invocations (usage) are immediately followed by a pair of parentheses. # Inside the parentheses you supply the values to be printed. # A literal string is a sequence of characters nested within either a pair of single or double quotes # We want to run the code -- that is, we want the code instructions to be carried out. # the print() functions displays its parameter(s) to the screen in what is called the CONSOLE WINDOW. # The Python word for an instruction is statement. # Programs can be more than one statement. If they are, they are executed from top to bottom print() # print with no values within the parentheses prints a blank line print( 'Apple', 4, 2.5, 'Orange' ) # a print() separates its values by a single separating space # the Pythonic word for the values in a function invocation is arguments. print() course = 'CS 1112 ' print( 'course', '=', course ) number_of_times = 10 lots = number_of_times * course print() print( lots ) print() first_name = 'Jim' last_name = 'Zambini' complete_name = first_name + ' ' + last_name print() print( complete_name ) print() print( '1112' ) print( 1112 )