d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Paying 500 Fg For Some Python Help
Add Reply New Topic New Poll
Member
Posts: 36,838
Joined: Aug 12 2007
Gold: 10,445.00
Apr 16 2017 08:52pm
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
Member
Posts: 36,838
Joined: Aug 12 2007
Gold: 10,445.00
Apr 16 2017 09:29pm
nvm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll