when reading numeric value from the usera programmer must use the input function to get the string of charactersand then use the int or float syntax to construct the numeric value that character string represents that isif call to response inputreports that the user entered the characters the syntax int(responsecould be used to produce the integer value it is quite common to combine these operations with syntax such as year int(inputin what year were you born)if we assume that the user will enter an appropriate response (in section we discuss error handling in such situation because input returns string as its resultuse of that function can be combined with the existing functionality of the string classas described in appendix for exampleif the user enters multiple pieces of information on the same lineit is common to call the split method on the resultas in reply inputenter and yseparated by spacespieces reply splitreturns list of stringsas separated by spaces float(pieces[ ] float(pieces[ ] sample program here is simplebut completeprogram that demonstrates the use of the input and print functions the tools for formatting the final output is discussed in appendix age int(inputenter your age in years)max heart rate ( ageas per med sci sports exerc target max heart rate printyour target fat-burning heart rate is targetfiles files are typically accessed in python beginning with call to built-in functionnamed openthat returns proxy for interactions with the underlying file for examplethe commandfp opensample txt )attempts to open file named sample txtreturning proxy that allows read-only access to the text file the open function accepts an optional second parameter that determines the access mode the default mode is for reading other common modes are for writing to the file (causing any existing file with that name to be overwritten)or for appending to the end of an existing file although we focus on use of text filesit is possible to work with binary filesusing access modes such as rb or wb