Here is an example of some of the questions.
#1
Using the NEW string formatting style explained in the link referenced on the checklist for Week 12, how would the string "Chapter 5 Test" be formatted to be Right-Justified in a 30 character space?
print("The {:_>30} is easy!".format("Chapter 5 Test"))
print("The %030s is easy!" % ("Chapter 5 Test") )
print("The {:>30} is easy!".format("Chapter 5 Test"))
print("The %+30s is easy!" % ("Chapter 5 Test") )
print("The {:<30} is easy!".format("Chapter 5 Test"))
print("The %-30s is easy!" % ("Chapter 5 Test") )
#2
In Python, if a line has been read from a file, and the line contains the Carriage Return character, how is that character represented in code or when added to a Python list?
I know some of this shit is in the book because my brother told me but i didn't buy the book or rent it.
lmk if can help, these should be some simple questions
This post was edited by Hboy on Apr 16 2017 08:54pm