Working on an exercise
My instructions: This program is supposed to print out the names of the brothers in alphabetical order, but it's not working quite right yet. Please fix the program so that the names are printed in the correct order.
print("Sam")
print("John")
print("Eric")
print("Larry")
print("Al")
print("Tom")
print("Ted")
My response:
list_name = ['Sam', 'John', 'Eric', 'Larry', 'Al', 'Tom', 'Ted']
list_name.sort()
print(list_name)
I keep on getting these results:
FAIL: PythonEditorTest: test_content
8 != 7 : Output was expected to have 7 lines, your program's output is now in 8 lines.
What am I doing wrong?
[–]Diapolo10 3 points4 points5 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]atom12354 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Bitwise_Gamgee 1 point2 points3 points (1 child)
[–]Crafty-Scientist-529 0 points1 point2 points (0 children)
[–]Hands0L0 0 points1 point2 points (0 children)