# Chapter 7,8,13 EXERCISES: # Find the errors # Could be syntax or expected result that needs fixing # (Could also be no errors ########################################## # Debug examples # SHEBANG LINES #! bin/bash #! usr/bin/env/ python #! /usr/bin/python #! /user/lucy/scripts # COMMAND LINE OPERATIONS cd -/pcfb/examples cd ~\pcfb\examples ls /Users/lucy/My Data/*.txt chmod u + x ~/scripts/test.py chmod u+x /scripts/test.py ########################################## # PYTHON MyInt = 10 MyFloat = 2.5 MyString = "X:" # Print operator print MyString,MyInt , MyFloat print MyInt + MyFloat print MyString + str(MyFloat) + MyInt print MyInt, Myfloat print MyString + str(MyInt) # Formatted print MyOut = %d,%5f % (MyInt,MyFloat) Result = "%.1f" % (MyInt/MyFloat) print "Result:",%f,"percent" % (MyInt/MyFloat) ##########################################